code: def annotations_func(func):
      
      if not has_type_hints(func):
          # What about defaults?
          func.__annotations__ =  {}
      func.__annotations__ = _get_type_hints(func,
              infer_defaults = False)
      return func
docs: Works like annotations, but is only applicable to functions,
      methods and properties.