docstr: Transform argparse error message into UsageError.
docstr_tok: ["Transform","argparse","error","message","into","UsageError","."]
code: def error(self, message):
      """Transform argparse error message into UsageError."""
      msg = "%s: error: %s" % (self.prog, message)
  
      if hasattr(self._parser, "_config_source_hint"):
          msg = "%s (%s)" % (msg, self._parser._config_source_hint)
  
      raise UsageError(self.format_usage() + msg)
  
imports: import argparse
  import warnings
  import py
  import six
  from _pytest.config.exceptions import UsageError
label_desc: Use image node_id 2 for calling the MyOptionParser obj's underlying member method code with example usage: obj.error(message) without return types