code: def _get_defaultdict(default: T) -> Dict[Any, T]:
      # This weird looking construct only exists, since `lambda`'s cannot be serialized by pickle.
      # If it were possible, we could replace this with `defaultdict(lambda: default)`
      return defaultdict(functools.partial(_default_arg, default))
  
file_path: vision/torchvision/prototype/transforms/_misc.py
imports: import functools
  import warnings
  from collections import defaultdict
  from typing import Any, Dict, Optional, Sequence, Tuple, Type, TypeVar, Union
  import torch
  from torchvision import tv_tensors
  from torchvision.transforms.v2 import Transform
  from torchvision.transforms.v2._utils import is_pure_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _get_defaultdict(default) and returns: defaultdict