code: def shuffle(x, axis=0, seed=None):
      # Ref: https://github.com/pytorch/pytorch/issues/71409
      x = convert_to_tensor(x)
  
      # Get permutation indices
      # Do not use generator during symbolic execution.
      if get_device() == "meta":
          row_perm = torch.rand(
              x.shape[: axis + 1], device=get_device()
          ).argsort(axis)
      else:
          generator = torch_seed_generator(seed)
          row_perm = torch.rand(
              x.shape[: axis + 1],
              generator=generator,
              device=get_device(),
          ).argsort(axis)
      for _ in range(x.ndim - axis - 1):
          row_perm.unsqueeze_(-1)
  
      # Reformat this for the gather operation
      row_perm = row_perm.repeat(
          *[1 for _ in range(axis + 1)], *(x.shape[axis + 1 :])
      )
      return x.gather(axis, row_perm)
  
imports: import torch
  import torch._dynamo
  import torch.nn.functional
  from keras.backend.config import floatx
  from keras.backend.torch.core import convert_to_tensor
  from keras.backend.torch.core import get_device
  from keras.backend.torch.core import to_torch_dtype
  from keras.random.seed_generator import SeedGenerator
  from keras.random.seed_generator import draw_seed
  from keras.random.seed_generator import make_default_seed
label_desc: Use image node_id 9 for calling a global function with example usage: shuffle(x, axis, seed) and returns: x