code: def typelogged_func(func):
      
      if not pytypes.typelogging_enabled:
          return func
      if hasattr(func, 'do_logging'):
          func.do_logging = True
          return func
      elif hasattr(func, 'do_typecheck'):
          # actually shouldn't happen
          return _typeinspect_func(func, func.do_typecheck, True)
      else:
          return _typeinspect_func(func, False, True)
docs: Works like typelogged, but is only applicable to functions,
      methods and properties.