import statistics


def generate_avg_hr(hr_list):
    """Calculates the average from list of heart rates

    Average heart rate can be used to check the health
    status of a patient from a period of time.

    Args:
        hr_list (list): recorded patient heart rates

    Returns:
        int: average heart rate of stored values
    """
    avg_hr = round(statistics.mean(hr_list))
    return avg_hr