code: def cast(x, dtype):
      if _torch.is_tensor(x):
          return x.to(dtype=dtype)
      return array(x, dtype=dtype)
  
imports: import numpy
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: cast(x, dtype) and returns: array, x