

def select(index, *args):
    'The intrinsic function Fn::Select returns a single object from a list of objects by index.\n\n    .. note:\n        select is represented here "just in case".\n        Most likely, using the python equivalent in a pyplate will be\n        easier to both look at and maintain, but in the event that selects\n        need to take place after CFN has interpolated all the intrinsic\n        functions, it may still be useful.\n\n    .. warning:: Important\n        Fn::Select does not check for null values or if the index is out of\n        bounds of the array. Both conditions will result in a stack error,\n        so you should be certain that the index you choose is valid, and that\n        the list contains non-null values.\n\n    Args:\n        index: The index of the object to retrieve. This must be a value\n            from zero to N-1, where N represents the number of\n            elements in the array.\n        *args: Any number of objects to select from, passed as\n            positional arguments. None of the arguments can be ``None``\n\n    Returns: The selected object.\n\n    '
    try:
        index = int(index)
    except ValueError:
        raise IntrinsicFuncInputError(select._errmsg_int)
    if (not index):
        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)],
    }

dataset/ETHPy150Open seandst/cfn-pyplates/cfn_pyplates/functions.py select/VarMisuse@44/464 `args`->`index`