class_docstr: Parser for command line arguments and ini-file values.
  
  :ivar extra_info: dict of generic param -> value to display in case
      there's an error processing the command line arguments.
code: def _getparser(self):
      from _pytest._argcomplete import filescompleter
  
      optparser = MyOptionParser(self, self.extra_info, prog=self.prog)
      groups = self._groups + [self._anonymous]
      for group in groups:
          if group.options:
              desc = group.description or group.name
              arggroup = optparser.add_argument_group(desc)
              for option in group.options:
                  n = option.names()
                  a = option.attrs()
                  arggroup.add_argument(*n, **a)
      # bash like autocompletion for dirs (appending '/')
      optparser.add_argument(
          FILE_OR_DIR, nargs="*"
      ).completer = filescompleter
      return optparser
  
imports: import argparse
  import warnings
  import py
  import six
  from _pytest.config.exceptions import UsageError
label_desc: Use image node_id 6 for calling the Parser obj's underlying member method code with example usage: obj._getparser() and returns: optparser