code: def test_null_stream_cannot_capture(self, upload):
      s = cupy.cuda.Stream(non_blocking=False)
      a = cupy.random.random((100,))
  
      with s:
          s.begin_capture()
          b = a + 4
          assert s.is_capturing()
          # cudaStreamLegacy is unhappy when a blocking stream is capturing
          with pytest.raises(cuda.runtime.CUDARuntimeError) as e:
              cuda.Stream.null.is_capturing()
          assert "cudaErrorStreamCaptureImplicit" in str(e.value)
          g = s.end_capture()
      assert not s.is_capturing()
      assert not cuda.Stream.null.is_capturing()
  
      # check the graph integrity
      if upload and cuda.runtime.runtimeGetVersion() >= 11010:
          g.upload()
      g.launch()
      s.synchronize()
      testing.assert_array_equal(b, a + 4)
  
imports: import pytest
  import cupy
  from cupy import cuda
  from cupy import testing
  import cupyx
label_desc: Use image node_id 9 for calling the TestGraph obj's underlying member method code with example usage: obj.test_null_stream_cannot_capture(upload) without return types