code: def test_chainerx_to_cupy_contiguous():
      dtype = "float32"
      a_chx = chainerx.arange(6, dtype=dtype, device="cuda:0").reshape(
          (2, 3)
      )
      a_cupy = cupy.ndarray(
          a_chx.shape,
          cupy.dtype(a_chx.dtype.name),
          cupy.cuda.MemoryPointer(
              cupy.cuda.UnownedMemory(
                  a_chx.data_ptr + a_chx.offset,
                  a_chx.data_size,
                  a_chx,
                  0,
              ),
              0,
          ),
          strides=a_chx.strides,
      )
  
      assert a_cupy.device.id == 0
      chainerx.testing.assert_array_equal_ex(a_chx, a_cupy.get())
  
      # Write to a_cupy
      a_cupy[0, 1] = 8
      chainerx.testing.assert_array_equal_ex(
          a_chx, numpy.array([[0, 8, 2], [3, 4, 5]], dtype)
      )
  
      # Write to a_chx
      a_chx += 1
      chainerx.testing.assert_array_equal_ex(
          a_cupy.get(), numpy.array([[1, 9, 3], [4, 5, 6]], dtype)
      )
  
file_path: chainer/tests/chainerx_tests/unit_tests/test_cupy_interop.py
imports: import numpy
  import pytest
  import sys
  import chainerx
  import chainerx.testing
label_desc: Use image node_id 9 for calling a global function with example usage: test_chainerx_to_cupy_contiguous() without return types