code: def test_error_already_set(msg):
      with pytest.raises(RuntimeError) as excinfo:
          m.throw_already_set(False)
      assert (
          msg(excinfo.value)
          == "Internal error: pybind11::error_already_set called while Python error indicator not set."
      )
  
      with pytest.raises(ValueError) as excinfo:
          m.throw_already_set(True)
      assert msg(excinfo.value) == "foo"
  
imports: import sys
  import pytest
  import env
  import pybind11_cross_module_tests
  import pybind11_tests
  from pybind11_tests import exceptions
label_desc: Use image node_id 2 for calling a global function with example usage: test_error_already_set(msg) without return types