code: def test_stream_fork_join(self, upload):
      s1 = cupy.cuda.Stream(non_blocking=True)
      s2 = cupy.cuda.Stream(non_blocking=True)
      e1 = cupy.cuda.Event()
      e2 = cupy.cuda.Event()
      a = cupy.random.random((100,))
  
      def func(x):
          return 3 * x + 1
  
      with s1:
          s1.begin_capture()
          out1 = a * 100
          e1.record(s1)
          s2.wait_event(e1)
          with s2:
              out2 = func(out1)
              e2.record(s2)
          s1.wait_event(e2)
          g = s1.end_capture()
  
      # check integrity
      assert not s1.is_capturing()
      assert not s2.is_capturing()
      if upload and cuda.runtime.runtimeGetVersion() >= 11010:
          g.upload()
      g.launch()
      s1.synchronize()
      testing.assert_array_equal(out2, func(a * 100))
  
imports: import pytest
  import cupy
  from cupy import cuda
  from cupy import testing
  import cupyx
label_desc: Use image node_id 8 for calling the TestGraph obj's underlying member method code with example usage: obj.test_stream_fork_join(upload) and returns: unknown