code: def cast_tensor(x, from_dtype=torch.float16, to_dtype=torch.float32):
      return x.to(dtype=to_dtype) if x.dtype == from_dtype else x
  
file_path: NeMo/nemo/utils/cast_utils.py
imports: from contextlib import nullcontext
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: cast_tensor(x, from_dtype, to_dtype) and returns: unknown