code: def test_redirect_err(capfd):
      msg = "StdOut"
      msg2 = "StdErr"
  
      stream = StringIO()
      with redirect_stderr(stream):
          with m.ostream_redirect(stdout=False):
              m.raw_output(msg)
              m.raw_err(msg2)
      stdout, stderr = capfd.readouterr()
      assert stdout == msg
      assert stderr == ""
      assert stream.getvalue() == msg2
  
imports: from contextlib import redirect_stderr, redirect_stdout
  from io import StringIO
  from pybind11_tests import iostream
label_desc: Use image node_id 20 for calling a global function with example usage: test_redirect_err(capfd) without return types