code: def test_reference_internal(m, member_name):
      if not hasattr(sys, "getrefcount"):
          pytest.skip("No reference counting")
      foo = m.CustomExample()
      counts = sys.getrefcount(foo)
      mem = getattr(foo, member_name)
      assert_equal_tensor_ref(mem, writeable=False)
      new_counts = sys.getrefcount(foo)
      assert new_counts == counts + 1
      assert_equal_tensor_ref(mem, writeable=False)
      del mem
      assert sys.getrefcount(foo) == counts
  
file_path: coremltools/deps/pybind11/tests/test_eigen_tensor.py
imports: import sys
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_reference_internal(m, member_name) without return types