code: def cutmix(batch: Dict, lam: float = 0.1) -> Dict:
      """Define how apply cutmix to a tensor.
  
      :param batch: Tensor on which apply the cutmix augmentation
      :param lam: probability values have 0 in a binary random mask, so it means probability original values will be
          updated
      """
      result = {}
      for key, value in batch.items():
          random_index = _get_random_index(value)
          x_binary_mask = torch.from_numpy(
              np.random.choice(2, size=value.shape, p=[lam, 1 - lam])
          )
          x_random = value[random_index, :]
          x_noised = value.clone().detach()
          x_noised[x_binary_mask == 0] = x_random[x_binary_mask == 0]
          result[key] = x_noised
      return result
  
imports: from typing import Dict
  import numpy
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: cutmix(batch, lam) and returns: result