```\nfunction _verifyLendingPoolIsActive(\n    IDefaultStateManager defaultStateManager,\n    address _protectionPoolAddress,\n    address _lendingPoolAddress\n  ) internal view {\n    LendingPoolStatus poolStatus = defaultStateManager.getLendingPoolStatus(\n      _protectionPoolAddress,\n      _lendingPoolAddress\n    );\n\n    // rest of code\n    if (\n      poolStatus == LendingPoolStatus.LateWithinGracePeriod ||\n      poolStatus == LendingPoolStatus.Late\n    ) {\n      revert IProtectionPool.LendingPoolHasLatePayment(_lendingPoolAddress);\n    }\n    // rest of code\n}\n```\n