code: def assert_equal_tensor_ref(mat, writeable=True, modified=None):
      assert mat.flags.writeable == writeable
  
      copy = np.array(tensor_ref)
      if modified is not None:
          copy[indices] = modified
  
      np.testing.assert_array_equal(mat, copy)
  
file_path: coremltools/deps/pybind11/tests/test_eigen_tensor.py
imports: import sys
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: assert_equal_tensor_ref(mat, writeable, modified) without return types