code: def __setitem__(self, index, value):
      """Set tensor values by index"""
      if not isinstance(value, type(self)):
          kwargs = {"device": self.device}
          if hasattr(self, "ptype"):
              kwargs["ptype"] = self.ptype
          value = self.new(value, **kwargs)
      self._tensor.__setitem__(index, value._tensor)
  
imports: import torch
  from ..common.tensor_types import is_tensor
  from ..common.util import torch_cat, torch_stack
label_desc: Use image node_id 1 for calling a global function with example usage: __setitem__(index, value) without return types