code: def extract_root_meta(cls, serializer, resource):
          
          many = False
          if hasattr(serializer, 'child'):
              many = True
              serializer = serializer.child
  
          data = {}
          if getattr(serializer, 'get_root_meta', None):
              json_api_meta = serializer.get_root_meta(resource, many)
              assert isinstance(json_api_meta, dict), 'get_root_meta must return a dict'
              data.update(json_api_meta)
          return data
docs: Calls a `get_root_meta` function on a serializer, if it exists.