def METHOD_NAME(self, module):
    # short-circuit redirect; avoid reinitializing existing modules
    if self._redirect_module:  # pylint: disable=protected-access
        return
    # execute the module's code in its namespace
    code_obj = self.get_code(self._fullname)  # pylint: disable=protected-access
    if code_obj is not None:  # things like NS packages that can't have code on disk will return None
        # This logic is loosely based on `AssertionRewritingHook._should_rewrite` from pytest.
        # See: https://github.com/pytest-dev/pytest/blob/779a87aada33af444f14841a04344016a087669e/src/_pytest/assertion/rewrite.py#L209
        should_rewrite = self._package_to_load == 'conftest' or self._package_to_load.startswith('test_')  # pylint: disable=protected-access
        if should_rewrite:
            # noinspection PyUnresolvedReferences
            assertion_rewriting_hook.METHOD_NAME(module)
        else:
            exec(code_obj, module.__dict__)  # pylint: disable=exec-used