/**
 * This function checks if the given license plate number belongs to a police officer or not.
 *
 * @param plateNumber The license plate number to be checked.
 * @param ownerInfo A dictionary containing the details of the license plate owner.
 * @return True if the license plate belongs to a police officer, False otherwise.
 */
fun checkLicensePlate(plateNumber: String, ownerInfo: Map<String, String>): Boolean {

    return if (ownerInfo.containsKey("license_plate") && ownerInfo["license_plate"] == plateNumber) {
        if (ownerInfo.containsKey("occupation") && ownerInfo["occupation"] == "Police Officer") {
            if (ownerInfo.containsKey("department") && ownerInfo["department"] == "Police") {
                true
            } else {
                false
            }
        } else {
            false
        }
    } else {
        false
    }
}
/**
 * This function checks if the given license plate number belongs to a police officer or not.
 *
 * @param plateNumber The license plate number to be checked.
 * @param ownerInfo A dictionary containing the details of the license plate owner.
 * @return True if the license plate belongs to a police officer, False otherwise.
 */
fun checkLicensePlate(plateNumber: String, ownerInfo: Map<String, String>): Boolean {
/**
 * This function checks if the given license plate number belongs to a police officer or not.
 *
 * @param plateNumber The license plate number to be checked.
 * @param ownerInfo A dictionary containing the details of the license plate owner.
 * @return True if the license plate belongs to a police officer, False otherwise.
 */
fun checkLicensePlate(plateNumber: String, ownerInfo: Map<String, String>): Boolean {

    return if (ownerInfo.containsKey("license_plate") && ownerInfo["license_plate"] == plateNumber) {
        if (ownerInfo.containsKey("occupation") && ownerInfo["occupation"] == "Police Officer") {
            if (ownerInfo.containsKey("department") && ownerInfo["department"] == "Police") {
                true
            } else {
                false
            }
        } else {
            false
        }
    } else {
        false
    }
}