def file_list(flist):
<EOL>if (isinstance(flist, string_types) and<EOL>flist.endswith(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'))):<EOL><INDENT>from .cache import read_cache<EOL>return read_cache(flist)<EOL><DEDENT>if isinstance(flist, string_types):<EOL><INDENT>return flist.split('<STR_LIT:U+002C>')<EOL><DEDENT>if isinstance(flist, (list, tuple)):<EOL><INDENT>return list(map(file_path, flist))<EOL><DEDENT>try:<EOL><INDENT>return [file_path(flist)]<EOL><DEDENT>except ValueError as exc:<EOL><INDENT>exc.args = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(flist),<EOL>)<EOL>raise<EOL><DEDENT>
Parse a number of possible input types into a list of filepaths.

    Parameters
    ----------
    flist : `file-like` or `list-like` iterable
        the input data container, normally just a single file path, or a list
        of paths, but can generally be any of the following

        - `str` representing a single file path (or comma-separated collection)
        - open `file` or `~gzip.GzipFile` object
        - :class:`~lal.utils.CacheEntry`
        - `str` with ``.cache`` or ``.lcf`` extension
        - simple `list` or `tuple` of `str` paths

    Returns
    -------
    files : `list`
        `list` of `str` file paths

    Raises
    ------
    ValueError
        if the input `flist` cannot be interpreted as any of the above inputs