def select(index, *args):
    try:
        index = int(index)
    except ValueError:
        raise IntrinsicFuncInputError(select._errmsg_int)
    if not args:
        raise IntrinsicFuncInputError(select._errmsg_empty)
    if filter(lambda x: x is None, args):
        raise IntrinsicFuncInputError(select._errmsg_null)
    try:
        args[index]
    except IndexError:
        raise IntrinsicFuncInputError(select._errmsg_index)

    return {'Fn::Select': [index, list(args)]}
Cleanup - be sure to kill any outstanding cursors.
dataset/ETHPy150Open seandst/cfn-pyplates/cfn_pyplates/functions.py/select--crossover with--dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor_manager.py/BatchCursorManager.__del__