code: def option_registrations_iter(self):
      
      def normalize_kwargs(args, orig_kwargs):
        nkwargs = copy.copy(orig_kwargs)
        dest = self.parse_dest(*args, **nkwargs)
        nkwargs['dest'] = dest
        if not ('default' in nkwargs and isinstance(nkwargs['default'], RankedValue)):
          nkwargs['default'] = self._compute_value(dest, nkwargs, [])
        return nkwargs
  
      # First yield any recursive options we inherit from our parent.
      if self._parent_parser:
        for args, kwargs in self._parent_parser._recursive_option_registration_args():
          yield args, normalize_kwargs(args, kwargs)
  
      # Then yield our directly-registered options.
      # This must come after yielding inherited recursive options, so we can detect shadowing.
      for args, kwargs in self._option_registrations:
        normalized_kwargs = normalize_kwargs(args, kwargs)
        if 'recursive' in normalized_kwargs:
          # If we're the original registrar, make sure we can distinguish that.
          normalized_kwargs['recursive_root'] = True
        yield args, normalized_kwargs
docs: Returns an iterator over the normalized registration arguments of each option in this parser.
  
      Useful for generating help and other documentation.
  
      Each yielded item is an (args, kwargs) pair, as passed to register(), except that kwargs
      will be normalized in the following ways:
        - It will always have 'dest' explicitly set.
        - It will always have 'default' explicitly set, and the value will be a RankedValue.
        - For recursive options, the original registrar will also have 'recursive_root' set.
  
      Note that recursive options we inherit from a parent will also be yielded here, with
      the correctly-scoped default value.