code: def parse_command(f):
      """Wrap command methods to automatically parse using parsers and catch errors to print
      stacktrace without leaving the prompt
      """
  
      @functools.wraps(f)
      def call(self, arg):
          try:
              options = self.parser.parse_args(
                  [f.__name__[3:]] + shlex.split(arg)
              )
          except SystemExit:
              return None
  
          try:
              rval = f(self, options)
          except KeyboardInterrupt:
              raise
          except BaseException:
              print(traceback.format_exc())
              rval = None
  
          return rval
  
      return call
  
imports: import argparse
  import cmd
  import functools
  import io
  import os
  import readline
  import shlex
  import traceback
  from orion.algo.space import Dimension
  from orion.core.evc import adapters, conflicts
  from orion.core.utils.diff import green, red
label_desc: Use image node_id 2 for calling a global function with example usage: parse_command(f) and returns: call, rval, None