parameters: (context)
return_statement: return build_url_from_settings(settings)
docstring: Returns the gateway web socket URL
docstring_summary: Returns the gateway web socket URL
docstring_tokens: Returns the gateway web socket URL
function: def telegraphy_ws_url(context):
      """Returns the gateway web socket URL"""
      host = settings.TELEGRAPHY_WS_HOST
  
      request = context.get('request')
      if not request:
          raise ImproperlyConfigured("Request is not present in context")
      # TODO: Check if this comparision is valid and/or sane
      host = extract_host_from_request(request)
      if settings.TELEGRAPHY_WS_HOST is not None:
          if settings.TELEGRAPHY_WS_HOST != host:
              raise ImproperlyConfigured(
                  "TELEGRAPHY_WS_HOST and current host do not match!")
      return build_url_from_settings(settings)
function_tokens: def telegraphy_ws_url ( context ) : host = settings . TELEGRAPHY_WS_HOST request = context . get ( 'request' ) if not request : raise ImproperlyConfigured ( "Request is not present in context" ) # TODO: Check if this comparision is valid and/or sane host = extract_host_from_request ( request ) if settings . TELEGRAPHY_WS_HOST is not None : if settings . TELEGRAPHY_WS_HOST != host : raise ImproperlyConfigured ( "TELEGRAPHY_WS_HOST and current host do not match!" ) return build_url_from_settings ( settings )