def identify_with_list(identifier):
@wraps(identifier)<EOL>def decorated_func(origin, filepath, fileobj, *args, **kwargs):<EOL><INDENT>try:<EOL><INDENT>filepath = file_list(filepath)[<NUM_LIT:0>]<EOL><DEDENT>except ValueError:<EOL><INDENT>if filepath is None:<EOL><INDENT>try:<EOL><INDENT>files = file_list(args[<NUM_LIT:0>])<EOL><DEDENT>except (IndexError, ValueError):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if files:<EOL><INDENT>filepath = files[<NUM_LIT:0>]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except IndexError:<EOL><INDENT>pass<EOL><DEDENT>return identifier(origin, filepath, fileobj, *args, **kwargs)<EOL><DEDENT>return decorated_func<EOL>
Decorate an I/O identifier to handle a list of files as input

    This function tries to resolve a single file path as a `str` from any
    file-like or collection-of-file-likes to pass to the underlying
    identifier for comparison.