<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gather_metadata(fn_glob, parser):
 """Given a glob and a parser object, create a metadata dataframe. Parameters fn_glob : str Glob string to find trajectory files. parser : descendant of _Parser Object that handles conversion of filenames to metadata rows. """

    meta = pd.DataFrame(parser.parse_fn(fn) for fn in glob.iglob(fn_glob))
    return meta.set_index(parser.index).sort_index()