code: def get_resource_links(self, item):
          
          if self.opts.self_url:
              ret = self.dict_class()
              kwargs = resolve_params(item, self.opts.self_url_kwargs or {})
              ret['self'] = self.generate_url(self.opts.self_url, **kwargs)
              return ret
          return None
docs: Hook for adding links to a resource object.