class_docstr: Context manager to redirect stderr for exec_command test.
code: def __exit__(self, exc_type, exc_value, traceback):
      self._stderr.flush()
      sys.stderr = self.old_stderr
      # note: closing sys.stderr won't close it.
      self._stderr.close()
  
imports: import os
  import pytest
  import sys
  from tempfile import TemporaryFile
  from numpy.distutils import exec_command
  from numpy.distutils.exec_command import get_pythonexe
  from numpy.testing import tempdir, assert_, assert_warns, IS_WASM
  from io import StringIO
label_desc: Use image node_id 3 for calling the redirect_stderr obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, traceback) without return types