code: def test_wrap():
      def assert_references(a, b, base=None):
          if base is None:
              base = a
          assert a is not b
          assert (
              a.__array_interface__["data"][0]
              == b.__array_interface__["data"][0]
          )
          assert a.shape == b.shape
          assert a.strides == b.strides
          assert a.flags.c_contiguous == b.flags.c_contiguous
          assert a.flags.f_contiguous == b.flags.f_contiguous
          assert a.flags.writeable == b.flags.writeable
          assert a.flags.aligned == b.flags.aligned
          # 1.13 supported Python 3.6
          if tuple(int(x) for x in np.__version__.split(".")[:2]) >= (
              1,
              14,
          ):
              assert a.flags.writebackifcopy == b.flags.writebackifcopy
          else:
              assert a.flags.updateifcopy == b.flags.updateifcopy
          assert np.all(a == b)
          assert not b.flags.owndata
          assert b.base is base
          if a.flags.writeable and a.ndim == 2:
              a[0, 0] = 1234
              assert b[0, 0] == 1234
  
      a1 = np.array([1, 2], dtype=np.int16)
      assert a1.flags.owndata and a1.base is None
      a2 = m.wrap(a1)
      assert_references(a1, a2)
  
      a1 = np.array([[1, 2], [3, 4]], dtype=np.float32, order="F")
      assert a1.flags.owndata and a1.base is None
      a2 = m.wrap(a1)
      assert_references(a1, a2)
  
      a1 = np.array([[1, 2], [3, 4]], dtype=np.float32, order="C")
      a1.flags.writeable = False
      a2 = m.wrap(a1)
      assert_references(a1, a2)
  
      a1 = np.random.random((4, 4, 4))
      a2 = m.wrap(a1)
      assert_references(a1, a2)
  
      a1t = a1.transpose()
      a2 = m.wrap(a1t)
      assert_references(a1t, a2, a1)
  
      a1d = a1.diagonal()
      a2 = m.wrap(a1d)
      assert_references(a1d, a2, a1)
  
      a1m = a1[::-1, ::-1, ::-1]
      a2 = m.wrap(a1m)
      assert_references(a1m, a2, a1)
  
imports: import pytest
  import env
  from pybind11_tests import numpy_array
label_desc: Use image node_id 14 for calling a global function with example usage: test_wrap() without return types