code: def assert_exception(res, actual=True, error_dict=None):
      assert actual is False
      assert len(error_dict) > 0
      if isinstance(res, Error):
          error_code = error_dict[ct.err_code]
          assert (
              res.code == error_code
              or error_dict[ct.err_msg] in res.message
          )
      else:
          log.error(
              "[CheckFunc] Response of API is not an error: %s"
              % str(res)
          )
          assert False
      return True
  
imports: from pymilvus.client.types import CompactionPlans
  from pymilvus import Role
  from utils.util_log import test_log
  from common import common_type
  from common import common_func
  from common.common_type import CheckTasks, Connect_Object_Name
  from pymilvus import Collection, Partition, ResourceGroupInfo
  from utils.api_request import Error
  import check.param_check
label_desc: Use image node_id 4 for calling the ResponseChecker obj's underlying member method code with example usage: obj.assert_exception(res, actual, error_dict) and returns: True