code: def test_nonunit_stride_to_python():
      from pybind11_tests import diagonal, diagonal_1, diagonal_n, block
  
      assert np.all(diagonal(ref) == ref.diagonal())
      assert np.all(diagonal_1(ref) == ref.diagonal(1))
      for i in range(-5, 7):
          assert np.all(
              diagonal_n(ref, i) == ref.diagonal(i)
          ), "diagonal_n({})".format(i)
  
      assert np.all(block(ref, 2, 1, 3, 3) == ref[2:5, 1:4])
      assert np.all(block(ref, 1, 4, 4, 2) == ref[1:, 4:])
      assert np.all(block(ref, 1, 4, 3, 2) == ref[1:4, 4:])
  
file_path: coremltools/deps/pybind11/tests/test_eigen.py
imports: import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_nonunit_stride_to_python() without return types