code: def to_primitive(self, load_rels=None, sparse_fields=None, *args,
                       **kwargs):
          
  
          if load_rels:
              for rel in load_rels:
                  getattr(self, rel).load()
  
          data = super(Model, self).to_primitive(*args, **kwargs)
  
          if sparse_fields:
              for key in data.keys():
                  if key not in sparse_fields:
                      del data[key]
  
          return data
docs: Override the schematics native to_primitive method
  
          :param loads_rels:
              List of field names that are relationships that should
              be loaded for the serialization process. This needs
              to be run before the native schematics to_primitive is
              run so the proper data is serialized.
  
          :param sparse_fields:
              List of field names that can be provided which limits
              the serialization to ONLY those field names. A whitelist
              effectively.