code: def test_capture_run_on_same_stream(self, upload):
      s = cupy.cuda.Stream(non_blocking=True)
  
      for n in range(3):
          func = getattr(self, "_helper{}".format(n + 1))
          a = cupy.random.random((100,))
  
          with s:
              s.begin_capture()
              out1 = func(a)
              g = s.end_capture()
              if upload and cuda.runtime.runtimeGetVersion() >= 11010:
                  g.upload()
              g.launch()
          s.synchronize()
  
          out2 = func(a)
          testing.assert_array_equal(out1, out2)
  
imports: import pytest
  import cupy
  from cupy import cuda
  from cupy import testing
  import cupyx
label_desc: Use image node_id 5 for calling the TestGraph obj's underlying member method code with example usage: obj.test_capture_run_on_same_stream(upload) without return types