code: def test_error_already_set(msg):
      from pybind11_tests import throw_already_set
  
      with pytest.raises(RuntimeError) as excinfo:
          throw_already_set(False)
      assert msg(excinfo.value) == "Unknown internal error occurred"
  
      with pytest.raises(ValueError) as excinfo:
          throw_already_set(True)
      assert msg(excinfo.value) == "foo"
  
imports: import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_error_already_set(msg) without return types