code: def metadata(abbr, __metadata=__metadata):
      
      # This data should change very rarely and is queried very often so
      # cache it here
      abbr = abbr.lower()
      if abbr in __metadata:
          return __metadata[abbr]
      rv = db.metadata.find_one({'_id': abbr})
  
      __metadata[abbr] = rv
      return rv
docs: Grab the metadata for the given two-letter abbreviation.