code: def resolve_cmds():
      _ext_debug("    Resolving metaflow commands")
      list_of_cmds = ENABLED_CMD
      _ext_debug("        Raw list is: %s" % str(list_of_cmds))
  
      set_of_commands = set()
      for p in list_of_cmds:
          if p.startswith("-"):
              set_of_commands.discard(p[1:])
          elif p.startswith("+"):
              set_of_commands.add(p[1:])
          else:
              set_of_commands.add(p)
      _ext_debug("        Resolved list is: %s" % str(set_of_commands))
  
      to_return = []
  
      for name in set_of_commands:
          class_path = _all_cmds_dict.get(name, None)
          if class_path is None:
              raise ValueError(
                  "Configuration requested command '%s' but no such command is available"
                  % name
              )
          path, cls_name = class_path.rsplit(".", 1)
          try:
              cmd_module = importlib.import_module(path)
          except ImportError:
              raise ValueError(
                  "Cannot locate command '%s' at '%s'" % (name, path)
              )
  
          cls = getattr(cmd_module, cls_name, None)
          if cls is None:
              raise ValueError(
                  "Cannot locate '%s' class for command at '%s'"
                  % (cls_name, path)
              )
          all_cmds = list(cls.commands)
          if len(all_cmds) > 1:
              raise ValueError(
                  "%s defines more than one command -- use a group"
                  % path
              )
          if all_cmds[0] != name:
              raise ValueError(
                  "%s: expected name to be '%s' but got '%s' instead"
                  % (path, name, all_cmds[0])
              )
          to_return.append(cls)
          _ext_debug(
              "        Added command '%s' from '%s'"
              % (name, class_path)
          )
  
      return to_return
  
file_path: metaflow/metaflow/extension_support/cmd.py
imports: import importlib
  import traceback
  from metaflow.metaflow_config_funcs import from_conf
  from .None import _ext_debug, get_modules
label_desc: Use image node_id 2 for calling a global function with example usage: resolve_cmds() and returns: to_return