code: def test_tensor_subscript_assign(self):
      def fn1(x):
          a = torch.zeros_like(x, dtype=torch.uint8)
          a[torch.tensor(0)] = torch.tensor(2, dtype=torch.uint8)
          return a
  
      def fn2(x):
          a = torch.zeros_like(x, dtype=torch.uint8)
          a[0] = 2
          return a
  
      def fn3(x):
          a = torch.zeros_like(x, dtype=torch.uint8)
          a[torch.tensor(0)] = 2
          return a
  
      def fn4(x):
          a = torch.zeros_like(x, dtype=torch.uint8)
          a[0] = torch.tensor(2, dtype=torch.uint8)
          return a
  
      def fn5(x):
          a = torch.zeros_like(x, dtype=torch.float32)
          a[torch.tensor(0)] = 2
          return a
  
      for fn in (fn1, fn2, fn3, fn4, fn5):
          self.checkScript(fn, (torch.zeros(2, dtype=torch.uint8),))
  
imports: import os
  import sys
  import inspect
  import unittest
  from typing import Dict, List
  import torch
  from torch.testing import FileCheck
  from torch.testing._internal.jit_utils import JitTestCase, RUN_CUDA
label_desc: Use image node_id 2 for calling the TestTensorBuiltins obj's underlying member method code with example usage: obj.test_tensor_subscript_assign() and returns: a, a, a, a, a