code: def one_hot(tensor, num_classes=-1):
      return ivy.astype(ivy.one_hot(tensor, num_classes), tensor.dtype)
  
imports: import ivy
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: one_hot(tensor, num_classes) and returns: ivy