code: def typelogged(memb):
      
      if not pytypes.typelogging_enabled:
          return memb
      if _check_as_func(memb):
          return typelogged_func(memb)
      if isclass(memb):
          return typelogged_class(memb)
      if ismodule(memb):
          return typelogged_module(memb)
      if memb in sys.modules or memb in pytypes.typechecker._pending_modules:
          return typelogged_module(memb)
      return memb
docs: Decorator applicable to functions, methods, properties,
      classes or modules (by explicit call).
      If applied on a module, memb must be a module or a module name contained in sys.modules.
      See pytypes.set_global_typelogged_decorator to apply this on all modules.
      Observes function and method calls at runtime and allows pytypes to generate stubfiles
      from the acquired type information.
      Use dump_cache to write a stubfile in this manner.