code: def sort(input, *, dim=-1, descending=False, stable=False, out=None):
      values = ivy.sort(
          input, axis=dim, descending=descending, stable=stable, out=out
      )
      indices = ivy.argsort(input, axis=dim, descending=descending)
      return namedtuple("sort", ["values", "indices"])(values, indices)
  
imports: import ivy
  import ivy.functional.frontends.torch
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from collections import namedtuple
label_desc: Use image node_id 26 for calling a global function with example usage: sort(input) and returns: namedtuple