code: def _error_opt_args(nargs, opt):
      if nargs == 1:
          raise BadOptionUsage(
              opt, "{} option requires an argument".format(opt)
          )
      raise BadOptionUsage(
          opt, "{} option requires {} arguments".format(opt, nargs)
      )
  
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 2 for calling a global function with example usage: _error_opt_args(nargs, opt) without return types