code: def test_chainerx_to_cupy_noncontiguous():
      dtype = "float32"
      a_chx = chainerx.arange(12, dtype=dtype, device="cuda:0").reshape(
          (2, 6)
      )[::-1, ::2]
      offset = a_chx.offset
  
      # test preconditions
      assert offset > 0
      assert not a_chx.is_contiguous
  
      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.data_size, a_chx, 0
              ),
              offset,
          ),
          strides=a_chx.strides,
      )
  
      assert a_chx.strides == a_cupy.strides
      chainerx.testing.assert_array_equal_ex(
          a_chx, a_cupy.get(), strides_check=False
      )
  
      a_cupy[1, 1] = 53
  
      assert a_chx.strides == a_cupy.strides
      chainerx.testing.assert_array_equal_ex(
          a_chx, a_cupy.get(), strides_check=False
      )
  
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 12 for calling a global function with example usage: test_chainerx_to_cupy_noncontiguous() without return types