code: def typechecked_func(func, force = False, argType = None, resType = None, prop_getter = False):
      
      if not pytypes.checking_enabled and not pytypes.do_logging_in_typechecked:
          return func
      assert(_check_as_func(func))
      if not force and is_no_type_check(func):
          return func
      if hasattr(func, 'do_typecheck'):
          func.do_typecheck = True
          return func
      elif hasattr(func, 'do_logging'):
          # actually shouldn't happen
          return _typeinspect_func(func, True, func.do_logging, argType, resType, prop_getter)
      else:
          return _typeinspect_func(func, True, False, argType, resType, prop_getter)
docs: Works like typechecked, but is only applicable to functions, methods and properties.