code: def _to_tensor(x):
      if not torch.is_tensor(x):
          x = torch.tensor(x)
      return x
  
imports: import math
  import torch
label_desc: Use image node_id 22 for calling a global function with example usage: _to_tensor(x) and returns: x