code: def gather_metadata(fn_glob, parser):
      
      meta = pd.DataFrame(parser.parse_fn(fn) for fn in glob.iglob(fn_glob))
      return meta.set_index(parser.index).sort_index()
docs: 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.