code: def verify_url(parse_input):
      # noinspection PyBroadException
      try:
          if not parse_input.startswith(
              "http://"
          ) and not parse_input.startswith("https://"):
              # if we have a specific port, use http prefix, otherwise assume https
              if ":" in parse_input:
                  parse_input = "http://" + parse_input
              else:
                  parse_input = "https://" + parse_input
          parsed_host = urlparse(parse_input)
          if parsed_host.scheme not in ("http", "https"):
              parsed_host = None
      except Exception:
          parsed_host = None
          print(
              "Could not parse url {}\nEnter your clearml-server host: ".format(
                  parse_input
              ),
              end="",
          )
      return parsed_host
  
imports: from __future__ import print_function
  import six
  import argparse
  import os
  from pathlib2 import Path
  from six.moves import input
  from six.moves.urllib.parse import urlparse
  from clearml.backend_api.session import Session
  from clearml.backend_api.session.defs import ENV_HOST
  from clearml.backend_config.defs import LOCAL_CONFIG_FILES, LOCAL_CONFIG_FILE_OVERRIDE_VAR
  from clearml.config import config_obj
  from clearml.utilities.pyhocon import ConfigFactory, ConfigMissingException
label_desc: Use image node_id 9 for calling a global function with example usage: verify_url(parse_input) and returns: parsed_host