code: def autodict_override_decorate(func  # type: Callable
                                 ):
      # type: (...) -> Callable
      
  
      if func.__name__ not in {Mapping.__iter__.__name__, Mapping.__getitem__.__name__, Mapping.__len__.__name__}:
          raise ValueError('@autodict_override can only be used on one of the three Mapping methods __iter__,'
                           '__getitem__ and __len__. Found: ' + func.__name__)
  
      # Simply annotate the function
      if hasattr(func, __AUTODICT_OVERRIDE_ANNOTATION):
          raise DuplicateOverrideError('Function is overridden twice : ' + func.__name__)
      else:
          setattr(func, __AUTODICT_OVERRIDE_ANNOTATION, True)
  
      return func
docs: Used to decorate a function as an overridden dictionary method (such as __iter__), without using the
      @autodict_override annotation.
  
      :param func: the function on which to execute. Note that it won't be wrapped but simply annotated.
      :return: