code: def tensor(x: Any, dtype: torch.dtype, device: torch.device):
      return (
          None
          if x is None
          else torch.tensor(x, dtype=dtype, device=device)
      )
  
imports: from typing import Any
  import torch
  import torch_scatter
  from packaging import version
label_desc: Use image node_id 1 for calling a global function with example usage: tensor(x, dtype, device) and returns: unknown