code: def split(
      x: torch.Tensor,
      /,
      *,
      copy: Optional[bool] = None,
      num_or_size_splits: Optional[
          Union[int, List[int], torch.Tensor]
      ] = None,
      axis: int = 0,
      with_remainder: bool = False,
  ) -> List[torch.Tensor]:
      if x.shape == ():
          if num_or_size_splits is not None and num_or_size_splits != 1:
              raise ivy.utils.exceptions.IvyException(
                  "input array had no shape, but num_sections specified was"
                  f" {num_or_size_splits}"
              )
          return [x]
      dim_size: int = x.shape[axis]
      if num_or_size_splits is None:
          num_or_size_splits = 1
      elif isinstance(num_or_size_splits, torch.Tensor):
          num_or_size_splits = num_or_size_splits.to(
              torch.int64
          ).tolist()
      elif isinstance(num_or_size_splits, int):
          if with_remainder:
              num_chunks = x.shape[axis] / num_or_size_splits
              num_chunks_int = math.floor(num_chunks)
              remainder = num_chunks - num_chunks_int
              if remainder == 0:
                  num_or_size_splits = torch.round(
                      torch.tensor(dim_size)
                      / torch.tensor(num_or_size_splits)
                  )
              else:
                  num_or_size_splits = tuple(
                      [num_or_size_splits] * num_chunks_int
                      + [int(remainder * num_or_size_splits)]
                  )
          else:
              num_or_size_splits = torch.round(
                  torch.tensor(dim_size)
                  / torch.tensor(num_or_size_splits)
              )
      elif isinstance(num_or_size_splits, list):
          num_or_size_splits = tuple(num_or_size_splits)
      return list(torch.split(x, num_or_size_splits, 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 10 for calling a global function with example usage: split() and returns: list, list