docs: def parse(cls, args):
          """
          Parse command line arguments to construct a dictionary of command
          parameters that can be used to create a command
  
          Args:
              `args`: sequence of arguments
  
          Returns:
              Dictionary that can be used in create method
  
          Raises:
              ParseError: when the arguments are not correct
          """
          parsed = {}
  
          try:
              (options, args) = cls.optparser.parse_args(args)
          except OptionParsingError as e:
              raise ParseError(e.msg, cls.optparser.format_help())
          except OptionParsingExit as e:
              return None
  
          parsed['label'] = options.label
          parsed['can_notify'] = options.can_notify
          parsed['name'] = options.name
          parsed['tags'] = options.tags
          parsed["command_type"] = "HadoopCommand"
          parsed['print_logs'] = options.print_logs
          parsed['print_logs_live'] = options.print_logs_live
          parsed['pool'] = options.pool
  
          if len(args) < 2:
              raise ParseError("Need at least two arguments", cls.usage)
  
          subcmd = args.pop(0)
          if subcmd not in cls.subcmdlist:
              raise ParseError("First argument must be one of <%s>" %
                               "|".join(cls.subcmdlist))
  
          parsed["sub_command"] = subcmd
          parsed["sub_command_args"] = " ".join("'" + str(a) + "'" for a in args)
  
          return parsed