/**
 * In the given veterinarian records dictionary 'vetRecords', there is a dictionary entry for each pet, where the key is the pet's name and the value is a list of their vaccination status. Your task is to update the vaccination status of a specific pet.
 *
 * @param vetRecords A dictionary containing the veterinarian records of the pets.
 * @param petName The name of the pet whose vaccination status needs to be updated.
 * @return True if the pet's vaccination status was successfully updated, False otherwise.
 */
fun updatePetVaccination(vetRecords: MutableMap<String, Boolean?>, petName: String): Boolean {

    if (vetRecords.isEmpty() || petName.isEmpty()) {
        return false
    }

    if (vetRecords.containsKey(petName)) {
        // Get the vaccination status of the given pet
        val vaccinationStatus = vetRecords[petName]

        // Check if the pet is already vaccinated
        if (vaccinationStatus != null && vaccinationStatus) {
            // If vaccinated, remove the vaccination status from the record
            vetRecords[petName] = null
        } else {
            // If not vaccinated, update the vaccination status to true
            vetRecords[petName] = true
        }

        return true
    }

    return false
}

// Example usage:
val vetRecords = mutableMapOf<String, Boolean?>()
/**
 * In the given veterinarian records dictionary 'vetRecords', there is a dictionary entry for each pet, where the key is the pet's name and the value is a list of their vaccination status. Your task is to update the vaccination status of a specific pet.
 *
 * @param vetRecords A dictionary containing the veterinarian records of the pets.
 * @param petName The name of the pet whose vaccination status needs to be updated.
 * @return True if the pet's vaccination status was successfully updated, False otherwise.
 */
fun updatePetVaccination(vetRecords: MutableMap<String, Boolean?>, petName: String): Boolean {
/**
 * In the given veterinarian records dictionary 'vetRecords', there is a dictionary entry for each pet, where the key is the pet's name and the value is a list of their vaccination status. Your task is to update the vaccination status of a specific pet.
 *
 * @param vetRecords A dictionary containing the veterinarian records of the pets.
 * @param petName The name of the pet whose vaccination status needs to be updated.
 * @return True if the pet's vaccination status was successfully updated, False otherwise.
 */
fun updatePetVaccination(vetRecords: MutableMap<String, Boolean?>, petName: String): Boolean {

    if (vetRecords.isEmpty() || petName.isEmpty()) {
        return false
    }

    if (vetRecords.containsKey(petName)) {
        // Get the vaccination status of the given pet
        val vaccinationStatus = vetRecords[petName]

        // Check if the pet is already vaccinated
        if (vaccinationStatus != null && vaccinationStatus) {
            // If vaccinated, remove the vaccination status from the record
            vetRecords[petName] = null
        } else {
            // If not vaccinated, update the vaccination status to true
            vetRecords[petName] = true
        }

        return true
    }

    return false
}

// Example usage:
val vetRecords = mutableMapOf<String, Boolean?>()