code: def verify_credentials(api_host, credentials):
      """check if the credentials are valid"""
      # noinspection PyBroadException
      try:
          print("Verifying credentials ...")
          if api_host:
              Session(
                  api_key=credentials["access_key"],
                  secret_key=credentials["secret_key"],
                  host=api_host,
                  http_retries_config={"total": 2},
              )
              print("Credentials verified!")
              return True
          else:
              print("Can't verify credentials")
              return False
      except Exception:
          print(
              "Error: could not verify credentials: key={} secret={}".format(
                  credentials.get("access_key"),
                  credentials.get("secret_key"),
              )
          )
          return False
  
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 4 for calling a global function with example usage: verify_credentials(api_host, credentials) and returns: True, False, False