code: def _get_task_host():
    
    version = os.environ["CURRENT_VERSION_ID"].split(".")[0]
    default_host = os.environ["DEFAULT_VERSION_HOSTNAME"]
    module = os.environ["CURRENT_MODULE_ID"]
    if os.environ["CURRENT_MODULE_ID"] == "default":
      return "%s.%s" % (version, default_host)
    return "%s.%s.%s" % (version, module, default_host)
docs: Get the Host header value for all mr tasks.
  
    Task Host header determines which instance this task would be routed to.
  
    Current version id format is: v7.368834058928280579
    Current module id is just the module's name. It could be "default"
    Default version hostname is app_id.appspot.com
  
    Returns:
      A complete host name is of format version.module.app_id.appspot.com
    If module is the default module, just version.app_id.appspot.com. The reason
    is if an app doesn't have modules enabled and the url is
    "version.default.app_id", "version" is ignored and "default" is used as
    version. If "default" version doesn't exist, the url is routed to the
    default version.