[
    {
        "request": {
            "language": "python",
            "segments": {
                "prefix": "def fib(n):\n    ",
                "suffix": "\n        return fib(n - 1) + fib(n - 2)"
            }
        },
        "expected": {
            "choices": [
                {
                    "index": 0,
                    "text": "    if n <= 1:\n            return n"
                }
            ]
        }
    },
    {
        "request": {
            "language": "python",
            "segments": {
                "prefix": "import datetime\n\ndef parse_expenses(expenses_string):\n    \"\"\"Parse the list of expenses and return the list of triples (date, value, currency).\n    Ignore lines starting with #.\n    Parse the date using datetime.\n    Example expenses_string:\n        2016-01-02 -34.01 USD\n        2016-01-03 2.59 DKK\n        2016-01-03 -2.72 EUR\n    \"\"\"\n    for line in expenses_string.split('\\n'):\n        "
            }
        },
        "expected": {
            "choices": [
                {
                    "index": 0,
                    "text": "if line.startswith('#'):\n            continue\n        date, value, currency = line.split()\n        date = datetime.datetime.strptime(date, '%Y-%m-%d')\n        yield date, float(value), currency"
                }
            ]
        }
    }
]