code: def parse_args(args):
      global _H2O_IP_
      global _H2O_PORT_
      global _H2O_EXTRA_CONNECT_ARGS_
      global _ON_HADOOP_
      global _HADOOP_NAMENODE_
      global _IS_IPYNB_
      global _IS_PYDEMO_
      global _IS_PYUNIT_
      global _IS_PYBOOKLET_
      global _RESULTS_DIR_
      global _TEST_NAME_
      global _FORCE_CONNECT_
      global _LDAP_USER_NAME_
      global _LDAP_PASSWORD_
      global _KERB_PRINCIPAL_
  
      i = 1
      while i < len(args):
          s = args[i]
          if s == "--usecloud" or s == "--uc":
              i = i + 1
              if i > len(args):
                  usage()
              param = args[i]
              if param.lower().startswith("https://"):
                  _H2O_EXTRA_CONNECT_ARGS_ = {
                      "https": True,
                      "verify_ssl_certificates": False,
                  }
                  param = param[8:]
              argsplit = param.split(":")
              _H2O_IP_ = argsplit[0]
              _H2O_PORT_ = int(argsplit[1])
          elif s == "--hadoopNamenode":
              i = i + 1
              if i > len(args):
                  usage()
              _HADOOP_NAMENODE_ = args[i]
          elif s == "--onHadoop":
              _ON_HADOOP_ = True
          elif s == "--ipynb":
              _IS_IPYNB_ = True
          elif s == "--pyDemo":
              _IS_PYDEMO_ = True
          elif s == "--pyUnit":
              _IS_PYUNIT_ = True
          elif s == "--pyBooklet":
              _IS_PYBOOKLET_ = True
          elif s == "--resultsDir":
              i = i + 1
              if i > len(args):
                  usage()
              _RESULTS_DIR_ = args[i]
          elif s == "--testName":
              i = i + 1
              if i > len(args):
                  usage()
              _TEST_NAME_ = args[i]
          elif s == "--ldapUsername":
              i = i + 1
              if i > len(args):
                  usage()
              _LDAP_USER_NAME_ = args[i]
          elif s == "--ldapPassword":
              i = i + 1
              if i > len(args):
                  usage()
              _LDAP_PASSWORD_ = args[i]
          elif s == "--kerbPrincipal":
              i = i + 1
              if i > len(args):
                  usage()
              _KERB_PRINCIPAL_ = args[i]
          elif s == "--forceConnect":
              _FORCE_CONNECT_ = True
          else:
              unknownArg(s)
          i = i + 1
  
imports: import sys, os
  from time import gmtime, strftime
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args(args) without return types