```\nif (safe.getThreshold() != _getCorrectThreshold()) {\n    revert SignersCannotChangeThreshold();\n}\n\nfunction _getCorrectThreshold() internal view returns (uint256 _threshold) {\n    uint256 count = _countValidSigners(safe.getOwners());\n    uint256 min = minThreshold;\n    uint256 max = targetThreshold;\n    if (count < min) _threshold = min;\n    else if (count > max) _threshold = max;\n    else _threshold = count;\n}\n```\n