def METHOD_NAME(msg, *_, **__):
    if msg == _INFER_PIP_REQUIREMENTS_FALLBACK_MESSAGE and _called_in_save_model():
        raise Exception(
            "`mlflow.models.infer_pip_requirements` should not fall back in"
            "`mlflow.*.save_model` during test"
        )