code: def _is_dataloader_shuffled(dataloader: object) -> bool:
      if hasattr(dataloader, "__pl_saved_kwargs"):
          # this attribute is not part of PyTorch's DataLoader, but could have been set by
          # our `_replace_init_method` context manager
          if "shuffle" in dataloader.__pl_saved_kwargs:
              return dataloader.__pl_saved_kwargs["shuffle"]
          if "shuffle" in dataloader.__pl_saved_arg_names:
              return dataloader.__pl_saved_args[
                  dataloader.__pl_saved_arg_names.index("shuffle")
              ]
      if hasattr(dataloader, "dataset") and isinstance(
          dataloader.dataset, IterableDataset
      ):
          # shuffling is useless with iterable datasets
          return False
      if not hasattr(dataloader, "sampler"):
          # shuffling is enabled via a sampler. No sampler, no shuffling
          return False
      sampler = dataloader.sampler
      if isinstance(sampler, SequentialSampler):
          return False
      return isinstance(sampler, RandomSampler)
  
imports: import inspect
  from dataclasses import fields
  from typing import Any, Dict, Generator, Iterable, Mapping, Optional, Sized, Tuple, Union
  import torch
  from lightning_utilities.core.apply_func import is_dataclass_instance
  from torch import Tensor
  from torch.utils.data import BatchSampler, DataLoader, IterableDataset, RandomSampler, Sampler, SequentialSampler
  from typing_extensions import TypeGuard
  import lightning.pytorch
  from lightning.fabric.utilities.data import _reinstantiate_wrapped_cls, _replace_value_in_saved_args, has_iterable_dataset, sized_len
  from lightning.pytorch.overrides.distributed import _IndexBatchSamplerWrapper
  from lightning.pytorch.trainer.states import RunningStage
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.rank_zero import WarningCache, rank_zero_warn
label_desc: Use image node_id 7 for calling a global function with example usage: _is_dataloader_shuffled(dataloader) and returns: isinstance, False, False, False, dataloader, dataloader