class_docstr: Mixup class from timm.
  https://github.com/rwightman/pytorch-image-models/blob/d30685c283137b4b91ea43c4e595c964cd2cb6f0/timm/data/mixup.py
  The parameters here are correspond to the mixup config in data.
  The mixup in timm only produce image mixup and cutmix with one-hot class target.
  This module helps to take the lambda from the Mixup.
  Lambda is added to the function to produce the mixup with specific lambda.
code: def _mix_elem(self, x, lam_batch):
      batch_size = len(x)
      if lam_batch is None:
          lam_batch, use_cutmix = self._params_per_elem(batch_size)
      else:
          _, use_cutmix = self._params_per_elem(batch_size)
      x_orig = x.clone()
      for i in range(batch_size):
          j = batch_size - i - 1
          lam = lam_batch[i]
          if lam != 1.0:
              if use_cutmix[i]:
                  (yl, yh, xl, xh), lam = cutmix_bbox_and_lam(
                      x[i].shape,
                      lam,
                      ratio_minmax=self.cutmix_minmax,
                      correct_lam=self.correct_lam,
                  )
                  x[i][:, yl:yh, xl:xh] = x_orig[j][:, yl:yh, xl:xh]
                  lam_batch[i] = lam
              else:
                  x[i] = x[i] * lam + x_orig[j] * (1 - lam)
      return torch.tensor(
          lam_batch, device=x.device, dtype=x.dtype
      ).unsqueeze(1)
  
file_path: autogluon/multimodal/src/autogluon/multimodal/data/mixup.py
imports: import numpy
  import torch
  from timm.data.mixup import Mixup, cutmix_bbox_and_lam, mixup_target
label_desc: Use image node_id 2 for calling the MixupModule obj's underlying member method code with example usage: obj._mix_elem(x, lam_batch) and returns: torch