code: def load_brain_metadata(proxy, include_fields):
      
      ret = {}
      for index in proxy.indexes():
          if index not in proxy:
              continue
          if include_fields and index not in include_fields:
              continue
          val = getattr(proxy, index)
          if val != Missing.Value:
              try:
                  json.dumps(val)
              except:
                  continue
              ret[index] = val
      return ret
docs: Load values from the catalog metadata into a list of dictionaries