code: def shuffle(
      x: torch.Tensor,
      axis: Optional[int] = 0,
      /,
      *,
      seed: Optional[int] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      if len(x.shape) == 0:
          return x
      batch_size = x.shape[0]
      if seed:
          torch.manual_seed(seed)
      return torch.index_select(
          x, 0, torch.randperm(batch_size), out=out
      )
  
file_path: ivy/ivy/functional/backends/torch/random.py
imports: import torch
  from typing import Optional, Union, Sequence
  import ivy
  from ivy.functional.ivy.random import _check_bounds_and_get_shape, _randint_check_dtype_and_bound, _check_valid_scale
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 6 for calling a global function with example usage: shuffle() and returns: torch, x