code: def create_from_resource_class(cls, resource_class):
          
          mp_reg = get_mapping_registry(cls.content_type)
          mp = mp_reg.find_or_create_mapping(resource_class)
          return cls(resource_class, mp)
docs: Creates a new representer for the given resource class.
  
          The representer obtains a reference to the (freshly created or looked
          up) mapping for the resource class.