code: def test_return_none(capture):
      n_inst = ConstructorStats.detail_reg_inst()
      with capture:
          p = m.Parent()
      assert capture == "Allocating parent."
      with capture:
          p.returnNullChildKeepAliveChild()
          assert ConstructorStats.detail_reg_inst() == n_inst + 1
      assert capture == ""
      with capture:
          del p
          assert ConstructorStats.detail_reg_inst() == n_inst
      assert capture == "Releasing parent."
  
      with capture:
          p = m.Parent()
      assert capture == "Allocating parent."
      with capture:
          p.returnNullChildKeepAliveParent()
          assert ConstructorStats.detail_reg_inst() == n_inst + 1
      assert capture == ""
      with capture:
          del p
          assert ConstructorStats.detail_reg_inst() == n_inst
      assert capture == "Releasing parent."
  
file_path: coremltools/deps/pybind11/tests/test_call_policies.py
imports: import pytest
  import env
  from pybind11_tests import ConstructorStats
  from pybind11_tests import call_policies
label_desc: Use image node_id 6 for calling a global function with example usage: test_return_none(capture) without return types