docstr: The FabricDataLoader is a wrapper for the :class:`~torch.utils.data.DataLoader`. It moves the data to the
  device automatically if the device is specified.
  
  Args:
      dataloader: The dataloader to wrap
      device: The device to which the data should be moved. By default the device is `None` and no data
          transfers will be made (identical behavior as :class:`~torch.utils.data.DataLoader`).
docstr_tok: ["The","FabricDataLoader","is","a","wrapper","for","the",":","class",":","`","~torch.utils.data.DataLoader","`",".","It","moves","the","data","to","the","device","automatically","if","the","device","is","specified",".","Args",":","dataloader",":","The","dataloader","to","wrap","device",":","The","device","to","which","the","data","should","be","moved",".","By","default","the","device","is","`","None","`","and","no","data","transfers","will","be","made","(","identical","behavior","as",":","class",":","`","~torch.utils.data.DataLoader","`",")","."]
code: def __init__(
      self,
      dataloader: DataLoader,
      device: Optional[torch.device] = None,
  ) -> None:
      """The FabricDataLoader is a wrapper for the :class:`~torch.utils.data.DataLoader`. It moves the data to the
      device automatically if the device is specified.
  
      Args:
          dataloader: The dataloader to wrap
          device: The device to which the data should be moved. By default the device is `None` and no data
              transfers will be made (identical behavior as :class:`~torch.utils.data.DataLoader`).
  
      """
      self.__dict__.update(dataloader.__dict__)
      self._dataloader = dataloader
      self._device = device
      self._num_iter_calls = 0
  
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 to create a new _FabricDataLoader object  with example: obj = _FabricDataLoader(dataloader, device)