code: def test_duplicate_local():
      """Tests expected failure when registering a class twice with py::local in the same module"""
      with pytest.raises(RuntimeError) as excinfo:
          m.register_local_external()
      import pybind11_tests
  
      assert str(excinfo.value) == (
          'generic_type: type "LocalExternal" is already registered!'
          if hasattr(pybind11_tests, "class_")
          else "test_class not enabled"
      )
  
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 4 for calling a global function with example usage: test_duplicate_local() without return types