code: def train_per_sample_transform(self) -> Callable:
      transforms = []
      if self.time_mask_param is not None:
          transforms.append(
              TAudio.TimeMasking(time_mask_param=self.time_mask_param)
          )
  
      if self.freq_mask_param is not None:
          transforms.append(
              TAudio.FrequencyMasking(
                  freq_mask_param=self.freq_mask_param
              )
          )
  
      transforms += [T.ToTensor(), T.Resize(self.spectrogram_size)]
      return T.Compose(
          [
              ApplyToKeys(DataKeys.INPUT, T.Compose(transforms)),
              ApplyToKeys(DataKeys.TARGET, torch.as_tensor),
          ]
      )
  
file_path: lightning-flash/src/flash/audio/classification/input_transform.py
imports: from dataclasses import dataclass
  from typing import Callable, Optional, Tuple
  import torch
  from flash.core.data.io.input import DataKeys
  from flash.core.data.io.input_transform import InputTransform
  from flash.core.data.transforms import ApplyToKeys
  from flash.core.utilities.imports import _TORCHAUDIO_AVAILABLE, _TORCHVISION_AVAILABLE, requires
label_desc: Use image node_id 1 for calling the AudioClassificationInputTransform obj's underlying member method code with example usage: obj.train_per_sample_transform() and returns: T