code: def tensor_split(input, indices_or_sections, dim=0):
      if isinstance(indices_or_sections, (list, tuple, ivy.Array)):
          indices_or_sections = (
              ivy.diff(
                  indices_or_sections,
                  prepend=[0],
                  append=[input.shape[dim]],
              )
              .astype(ivy.int8)
              .to_list()
          )
      return ivy.split(
          input,
          num_or_size_splits=indices_or_sections,
          axis=dim,
          with_remainder=True,
      )
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back, numpy_to_torch_style_args, to_ivy_shape
  import ivy.functional.frontends.torch
label_desc: Use image node_id 35 for calling a global function with example usage: tensor_split(input, indices_or_sections, dim) and returns: ivy