code: def test_nonlocal_failure():
      """Tests that attempting to register a non-local type in multiple modules fails"""
      import pybind11_cross_module_tests as cm
  
      with pytest.raises(RuntimeError) as excinfo:
          cm.register_nonlocal()
      assert (
          str(excinfo.value)
          == 'generic_type: type "NonLocalType" is already registered!'
      )
  
file_path: coremltools/deps/pybind11/tests/test_local_bindings.py
imports: import pytest
  import env
  from pybind11_tests import local_bindings
label_desc: Use image node_id 3 for calling a global function with example usage: test_nonlocal_failure() without return types