code: def test_per_device(self):
      with cuda.Device(0):
          stream0 = cuda.Stream()
          with stream0:
              assert stream0 == cuda.get_current_stream()
              with cuda.Device(1):
                  assert stream0 != cuda.get_current_stream()
                  assert cuda.Stream.null == cuda.get_current_stream()
                  assert stream0 == cuda.get_current_stream(0)
              assert stream0 == cuda.get_current_stream()
  
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 13 for calling the TestStream obj's underlying member method code with example usage: obj.test_per_device() without return types