code: def test_replace_at_scopes(self):
      self.assertEqual(
          [1, 2, 3, 4], replace_at_scopes([2, 2, 3, 4], [[0, 1]], [[1]])
      )
      self.assertEqual(
          [1, 2, 3, 4],
          replace_at_scopes([2, 2, 3, 5], [[0, 1], [3, 4]], [[1], [4]]),
      )
      self.assertEqual(
          [1, 2, 3, 4],
          replace_at_scopes([4, 2, 3, 1], [[0, 4]], [[1, 2, 3, 4]]),
      )
  
      # Test successive replacement of individual elements
      num = random.randint(100, 1000)
      test_list = [random.randint(0, int(1e9)) for i in range(num)]
      test_pos = [[i, i + 1] for i in range(num)]
      random.shuffle(test_pos)
      self.assertEqual(
          list(range(num)),
          replace_at_scopes(
              test_list, test_pos, [[i[0]] for i in test_pos]
          ),
      )
      self.assertEqual(
          list(range(num)),
          replace_at_scopes(
              test_list, test_pos, [i[0] for i in test_pos]
          ),
      )
  
      # The test replaces multiple elements in succession
      l = random.randint(1, num - 2)
      test_pos = random.sample(list(range(1, num)), l)
      test_pos += [num, 0]
      test_pos.sort()
      test_pos = [[test_pos[i], test_pos[i + 1]] for i in range(l + 1)]
      random.shuffle(test_pos)
      self.assertEqual(
          list(range(num)),
          replace_at_scopes(
              test_list,
              test_pos,
              [[j for j in range(i[0], i[1])] for i in test_pos],
          ),
      )
  
      l = random.randint(2, 99)
      num = num - num % l
      test_list = test_list[:num]
      test_pos = [[i * l, i * l + l] for i in range(int(num / l))]
      random.shuffle(test_pos)
      self.assertEqual(
          list(range(num)),
          replace_at_scopes(
              test_list,
              test_pos,
              [[i[0] + j for j in range(l)] for i in test_pos],
          ),
      )
  
imports: import unittest
  from textflint.common.utils.list_op import *
label_desc: Use image node_id 2 for calling the TestListOp obj's underlying member method code with example usage: obj.test_replace_at_scopes() without return types