code: def repeat(
      x: torch.Tensor,
      /,
      repeats: Union[int, Iterable[int]],
      *,
      axis: Optional[int] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      if len(x.shape) == 0 and axis in [0, -1]:
          axis = None
      repeats = torch.tensor(repeats)
      return torch.repeat_interleave(x, repeats, axis)
  
imports: import math
  from numbers import Number
  from typing import Union, Optional, Tuple, List, Sequence, Iterable
  import torch
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.ivy.manipulation import _calculate_out_shape
  from .None import backend_version
label_desc: Use image node_id 11 for calling a global function with example usage: repeat(repeats) and returns: torch