code: def _expect_error(
      self, msg, err_type, no_error_msg="Failed to generate error"
  ):
      try:
          self._run()
      except subprocess.CalledProcessError as e:
          assertion_message = f"Expected: {msg}\nGot: {e.stderr}"
          assert re.search(msg, e.stderr), assertion_message
  
          assertion_message = (
              f"Expected error of type: {err_type}; see full "
              f"error:\n{e.stderr}"
          )
          assert re.search(err_type, e.stderr), assertion_message
      else:
          assert False, no_error_msg
  
imports: import sys, platform, re, pytest
  from numpy.core._multiarray_umath import __cpu_features__, __cpu_baseline__, __cpu_dispatch__
  import numpy
  import subprocess
  import pathlib
  import os
  import re
label_desc: Use image node_id 3 for calling the TestEnvPrivation obj's underlying member method code with example usage: obj._expect_error(msg, err_type, no_error_msg) without return types