code: def _unwrap_objects(collection: Any) -> Any:
      def _unwrap(
          obj: Union[_FabricModule, _FabricOptimizer, _FabricDataLoader]
      ) -> Union[nn.Module, Optimizer, DataLoader]:
          if isinstance(
              unwrapped := _unwrap_compiled(obj), _FabricModule
          ):
              return unwrapped._forward_module
          if isinstance(obj, _FabricOptimizer):
              return obj.optimizer
          if isinstance(obj, _FabricDataLoader):
              return obj._dataloader
          return obj
  
      types = [_FabricModule, _FabricOptimizer, _FabricDataLoader]
      if _TORCH_GREATER_EQUAL_2_0:
          from torch._dynamo import OptimizedModule
  
          types.append(OptimizedModule)
  
      return apply_to_collection(
          collection, dtype=tuple(types), function=_unwrap
      )
  
imports: import inspect
  from functools import wraps
  from typing import Any, Callable, Dict, Generator, Iterator, List, Mapping, Optional, TypeVar, Union, overload
  import torch
  from lightning_utilities.core.apply_func import apply_to_collection
  from torch import Tensor
  from torch import nn
  from torch.nn.modules.module import _IncompatibleKeys
  from torch.optim import Optimizer
  from torch.utils.data import DataLoader
  from typing_extensions import override
  from lightning.fabric.plugins import Precision
  from lightning.fabric.strategies import Strategy
  from lightning.fabric.utilities import move_data_to_device
  from lightning.fabric.utilities.data import _set_sampler_epoch
  from lightning.fabric.utilities.device_dtype_mixin import _DeviceDtypeModuleMixin
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.fabric.utilities.types import Optimizable
label_desc: Use image node_id 1 for calling a global function with example usage: _unwrap_objects(collection) and returns: apply_to_collection, obj, unwrapped, obj, obj