code: def _get_url(cls, name, message_model, dispatch_model):
          
          global APP_URLS_ATTACHED
  
          url = ''
  
          if dispatch_model is None:
              return url
  
          if APP_URLS_ATTACHED != False:  # sic!
  
              hashed = cls.get_dispatch_hash(dispatch_model.id, message_model.id)
  
              try:
                  url = reverse(name, args=[message_model.id, dispatch_model.id, hashed])
                  url = '%s%s' % (get_site_url(), url)
              except NoReverseMatch:
                  if APP_URLS_ATTACHED is None:
                      APP_URLS_ATTACHED = False
  
          return url
docs: Returns a common pattern sitemessage URL.
  
          :param str name: URL name
          :param Message message_model:
          :param Dispatch|None dispatch_model:
          :return: