code: def add_hypermedia(self, obj):
          '''
          Adds HATEOAS links to the resource. Adds href link to self.
          Override in subclasses to include additional functionality
          '''
          if hasattr(self, 'pk'):
              obj['_links'] = {
                  'self': {
                      'href': '{}{}/'.format(self.get_resource_uri(), obj[self.pk])
                  }
              f add_hypermedia(self, obj):
          '''
          Adds HATEOAS links to the resource. Adds href link to self.
          Override in subclasses to include additional functionality
          '''
          if hasattr(self, 'pk'):
              obj['_links'] = {
                  'self': {
                      'href': '{}{}/'.format(self.get_resource_uri(), obj[self.pk])
                  }
              }
docs: Adds HATEOAS links to the resource. Adds href link to self.
          Override in subclasses to include additional functionality