code: def __init__(self, parser, extra_info=None, prog=None):
      if not extra_info:
          extra_info = {}
      self._parser = parser
      argparse.ArgumentParser.__init__(
          self,
          prog=prog,
          usage=parser._usage,
          add_help=False,
          formatter_class=DropShorterLongHelpFormatter,
      )
      # extra_info is a dict of (param -> value) to display if there's
      # an usage error to provide more contextual information to the user
      self.extra_info = extra_info
  
imports: import argparse
  import warnings
  import py
  import six
  from _pytest.config.exceptions import UsageError
label_desc: Use image node_id 1 to create a new MyOptionParser object from inherited base classes: argparse with example: obj = MyOptionParser(parser, extra_info, prog)