```\n  function _getLendingPoolStatus(address _lendingPoolAddress)\n    internal\n    view\n    returns (LendingPoolStatus)\n  {\n    if (!_isReferenceLendingPoolAdded(_lendingPoolAddress)) {\n      return LendingPoolStatus.NotSupported;\n    }\n\n\n    ILendingProtocolAdapter _adapter = _getLendingProtocolAdapter(\n      _lendingPoolAddress\n    );\n\n\n    if (_adapter.isLendingPoolExpired(_lendingPoolAddress)) {\n      return LendingPoolStatus.Expired;\n    }\n\n\n    if (\n      _adapter.isLendingPoolLateWithinGracePeriod(\n        _lendingPoolAddress,\n        Constants.LATE_PAYMENT_GRACE_PERIOD_IN_DAYS\n      )\n    ) {\n      return LendingPoolStatus.LateWithinGracePeriod;\n    }\n\n\n    if (_adapter.isLendingPoolLate(_lendingPoolAddress)) {\n      return LendingPoolStatus.Late;\n    }\n\n\n    return LendingPoolStatus.Active;\n  }\n```\n