class_docstr: Mixup for labels. Should be initialized in exactly the same way as
  :cla:`ffcv.transforms.ImageMixup`.
class_docstr_tok: ["Mixup","for","labels",".","Should","be","initialized","in","exactly","the","same","way","as",":","cla",":","`","ffcv.transforms.ImageMixup","`","."]
code: def generate_code(self) -> Callable:
      alpha = self.alpha
      same_lam = self.same_lambda
      my_range = Compiler.get_iterator()
  
      def mixer(labels, temp_array, indices):
          num_labels = labels.shape[0]
          # permutation = np.random.permutation(num_labels)
          np.random.seed(indices[-1])
          lam = (
              np.random.beta(alpha, alpha)
              if same_lam
              else np.random.beta(alpha, alpha, num_labels)
          )
  
          for ix in my_range(num_labels):
              temp_array[ix, 0] = labels[ix][0]
              temp_array[ix, 1] = labels[ix - 1][0]
              temp_array[ix, 2] = lam if same_lam else lam[ix]
  
          return temp_array
  
      mixer.is_parallel = True
      mixer.with_indices = True
  
      return mixer
  
imports: from typing import Tuple
  from numba import objmode
  import numpy
  import torch
  import torch.nn.functional
  from dataclasses import replace
  from typing import Callable, Optional, Tuple
  from ..pipeline.allocation_query import AllocationQuery
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from ..pipeline.compiler import Compiler
label_desc: Use image node_id 2 for calling the LabelMixup obj's underlying member method code with example usage: obj.generate_code() and returns: mixer, temp_array