class_docstr: Mixup for images. Operates on raw arrays (not tensors).
  
  Parameters
  ----------
  alpha : float
      Mixup parameter alpha
  same_lambda : bool
      Whether to use the same value of lambda across the whole batch, or an
      individually sampled lambda per image in the batch
class_docstr_tok: ["Mixup","for","images",".","Operates","on","raw","arrays","(","not","tensors",")",".","Parameters","--","--","--","--","--","alpha",":","float","Mixup","parameter","alpha","same_lambda",":","bool","Whether","to","use","the","same","value","of","lambda","across","the","whole","batch",",","or","an","individually","sampled","lambda","per","image","in","the","batch"]
code: def generate_code(self) -> Callable:
      alpha = self.alpha
      same_lam = self.same_lambda
      my_range = Compiler.get_iterator()
  
      def mixer(images, dst, indices):
          np.random.seed(indices[-1])
          num_images = images.shape[0]
          lam = (
              np.random.beta(alpha, alpha)
              if same_lam
              else np.random.beta(alpha, alpha, num_images)
          )
          for ix in my_range(num_images):
              l = lam if same_lam else lam[ix]
              dst[ix] = l * images[ix] + (1 - l) * images[ix - 1]
  
          return dst
  
      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 ImageMixup obj's underlying member method code with example usage: obj.generate_code() and returns: mixer, dst