class_docstr: Serializable class that applies a transform to a key specified field in samples.
class_docstr_tok: ["Serializable","class","that","applies","a","transform","to","a","key","specified","field","in","samples","."]
docstr: The constructor method of ApplyTransformToKey class.
  
  Args:
      transform: a callable function that takes sample data of type dict as input
      key: the key in sample whose corresponding value will undergo
          the transform
docstr_tok: ["The","constructor","method","of","ApplyTransformToKey","class",".","Args",":","transform",":","a","callable","function","that","takes","sample","data","of","type","dict","as","input","key",":","the","key","in","sample","whose","corresponding","value","will","undergo","the","transform"]
code: def __init__(
      self, transform: Callable, key: Union[int, str] = "input"
  ) -> None:
      """The constructor method of ApplyTransformToKey class.
  
      Args:
          transform: a callable function that takes sample data of type dict as input
          key: the key in sample whose corresponding value will undergo
              the transform
  
      """
      self.key: Union[int, str] = key
      self.transform: Callable = transform
  
imports: import collections
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torchvision.transforms
  from .None import build_transforms, ClassyTransform, register_transform
label_desc: Use image node_id 1 to create a new ApplyTransformToKey object  with example: obj = ApplyTransformToKey(transform, key)