code: def get_url(self, name, view_name, kwargs, request):
          
  
          # Return None if the view name is not supplied
          if not view_name:
              return None
  
          # Return the hyperlink, or error if incorrectly configured.
          try:
              url = self.reverse(view_name, kwargs=kwargs, request=request)
          except NoReverseMatch:
              msg = (
                  'Could not resolve URL for hyperlinked relationship using '
                  'view name "%s". You may have failed to include the related '
                  'model in your API, or incorrectly configured the '
                  '`lookup_field` attribute on this field.'
              )
              raise ImproperlyConfigured(msg % view_name)
  
          if url is None:
              return None
  
          return Hyperlink(url, name)
docs: Given a name, view name and kwargs, return the URL that hyperlinks to the object.
  
          May raise a `NoReverseMatch` if the `view_name` and `lookup_field`
          attributes are not configured to correctly match the URL conf.