code: def _extract_transforms_from_standard_dataset(dataset):
      if hasattr(dataset, "transforms"):
          # Has torchvision >= v0.3.0 transforms
          # Ignore transform and target_transform
          transforms = getattr(dataset, "transforms")
          if isinstance(transforms, StandardTransform):
              if (
                  transforms.transform is not None
                  or transforms.target_transform is not None
              ):
                  return TupleTransform(
                      [
                          transforms.transform,
                          transforms.target_transform,
                      ]
                  )
      elif hasattr(dataset, "transform") or hasattr(
          dataset, "target_transform"
      ):
          return TupleTransform(
              [
                  getattr(dataset, "transform"),
                  getattr(dataset, "target_transform"),
              ]
          )
  
      return None
  
file_path: avalanche/avalanche/benchmarks/utils/dataset_traversal_utils.py
imports: from collections import OrderedDict, defaultdict, deque
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, TypeVar, Union
  from avalanche.benchmarks.scenarios.generic_scenario import CLScenario
  from avalanche.benchmarks.utils.data import _FlatDataWithTransform, AvalancheDataset
  from avalanche.benchmarks.utils.dataset_definitions import IDataset
  from avalanche.benchmarks.utils.dataset_utils import find_list_from_index
  from avalanche.benchmarks.utils.flat_data import FlatData
  from torch.utils.data import Subset, ConcatDataset, Dataset
  from avalanche.benchmarks.utils.transform_groups import EmptyTransformGroups
  from avalanche.benchmarks.utils.transforms import TupleTransform
  from torchvision.datasets.vision import StandardTransform
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_transforms_from_standard_dataset(dataset) and returns: None, TupleTransform, TupleTransform