code: def _get_relationship_data(self):
          
          relationship_field = request.path.split('/')[-1].replace('-', '_')
  
          if relationship_field not in get_relationships(self.schema):
              raise RelationNotFound("{} has no attribute {}".format(self.schema.__name__, relationship_field))
  
          related_type_ = self.schema._declared_fields[relationship_field].type_
          related_id_field = self.schema._declared_fields[relationship_field].id_field
          model_relationship_field = get_model_field(self.schema, relationship_field)
  
          return relationship_field, model_relationship_field, related_type_, related_id_field
docs: Get useful data for relationship management