code: def test_get_and_add_callback(self):
      N = 100
      cupy_arrays = [testing.shaped_random((2, 3)) for _ in range(N)]
  
      stream = self.stream
  
      out = []
      for i in range(N):
          numpy_array = cupy_arrays[i].get(stream=stream)
          stream.add_callback(
              lambda _, __, t: out.append(t[0]), (i, numpy_array)
          )
  
      stream.synchronize()
      assert out == list(range(N))
  
imports: import gc
  import threading
  import unittest
  import pytest
  import cupy
  from cupy._creation import from_data
  from cupy import cuda
  from cupy import testing
label_desc: Use image node_id 3 for calling the TestExternalStream obj's underlying member method code with example usage: obj.test_get_and_add_callback() without return types