class_docstr: The option parser is an internal class that is ultimately used to
  parse options and arguments.  It's modelled after optparse and brings
  a similar but vastly simplified API.  It should generally not be used
  directly as the high level Click classes wrap it for you.
  
  It's not nearly as extensible as optparse or argparse as it does not
  implement features that are implemented on a higher level (such as
  types or defaults).
  
  :param ctx: optionally the :class:`~click.Context` where this parser
              should go with.
class_docstr_tok: ["The","option","parser","is","an","internal","class","that","is","ultimately","used","to","parse","options","and","arguments",".","It","'s","modelled","after","optparse","and","brings","a","similar","but","vastly","simplified","API",".","It","should","generally","not","be","used","directly","as","the","high","level","Click","classes","wrap","it","for","you",".","It","'s","not","nearly","as","extensible","as","optparse","or","argparse","as","it","does","not","implement","features","that","are","implemented","on","a","higher","level","(","such","as","types","or","defaults",")",".",":","param","ctx",":","optionally","the",":","class",":","`","~click.Context","`","where","this","parser","should","go","with","."]
code: def _match_long_opt(self, opt, explicit_value, state):
      if opt not in self._long_opt:
          possibilities = [
              word for word in self._long_opt if word.startswith(opt)
          ]
          raise NoSuchOption(
              opt, possibilities=possibilities, ctx=self.ctx
          )
  
      option = self._long_opt[opt]
      if option.takes_value:
          # At this point it's safe to modify rargs by injecting the
          # explicit value, because no exception is raised in this
          # branch.  This means that the inserted value will be fully
          # consumed.
          if explicit_value is not None:
              state.rargs.insert(0, explicit_value)
  
          nargs = option.nargs
          if len(state.rargs) < nargs:
              _error_opt_args(nargs, opt)
          elif nargs == 1:
              value = state.rargs.pop(0)
          else:
              value = tuple(state.rargs[:nargs])
              del state.rargs[:nargs]
  
      elif explicit_value is not None:
          raise BadOptionUsage(
              opt, "{} option does not take a value".format(opt)
          )
  
      else:
          value = None
  
      option.process(value, state)
  
imports: import re
  from collections import deque
  from .exceptions import BadArgumentUsage
  from .exceptions import BadOptionUsage
  from .exceptions import NoSuchOption
  from .exceptions import UsageError
label_desc: Use image node_id 7 for calling the OptionParser obj's underlying member method code with example usage: obj._match_long_opt(opt, explicit_value, state) without return types