docs: def add_relationship(_class, name,
                           view_name=None, lookup_field=None,
                           serializer=None, many=False, queryset=None,
                           function=None):
          """ adds a relationship to serializer
          :param name: relationship name (dictionary key)
          :type name: str
          :param view_name: view name as specified in urls.py
          :type view_name: str
          :param lookup_field: lookup field, usually slug or id/pk
          :type lookup_field: str
          :param serializer: Serializer class to use for relationship
          :type serializer: Serializer
          :param many: indicates if it's a list or a single element, defaults to False
          :type many: bool
          :param queryset: queryset string representation to use for the serializer
          :type queryset: QuerySet
          :param function: function that returns the value to display (dict, list or str)
          :type function: function(obj, request)
          :returns: None
          """
          if view_name is not None and lookup_field is not None:
              _class._relationships[name] = {
                  'type': 'link',
                  'view_name': view_name,
                  'lookup_field': lookup_field
              }
          elif serializer is not None and queryset is not None:
              _class._relationships[name] = {
                  'type': 'serializer',
                  'serializer': serializer,
                  'many': many,
                  'queryset': queryset
              }
          elif function is not None:
              _class._relationships[name] = {
                  'type': 'function',
                  'function': function
              }
          else:
              raise ValueError('missing arguments, either pass view_name and lookup_field or serializer and queryset')