from datetime import datetime


def calculate_hrs_after(all_hr_entries, all_timestamps,
                        heart_rate_average_since):
    """ Find heart rate entries after indicated time

    This function uses a for loop and if/else statement to index and make a
    list of all the heart rate entries that occur after the
    "heart_rate_average_since" date (from inputted json).
    If the date is a future date, an empty list will be returned.

    :param all_hr_entries: a list of all the indicated patient's heart rate
    entries
    :param all_timestamps: a list of all the indicated patient's heart rate
    entry timestamps
    :param heart_rate_average_since: a string containing the desired date. All
    heart rates entered after this date will be averaged.

    :returns: A list of heart rate values that were entered after the indicated
    date. An empty list will be returned if the date is in the future.
    """
    average_since = datetime.strptime(heart_rate_average_since,
                                      "%Y-%m-%d %H:%M:%S")
    hrs_after_time = []
    for entry in range(0, len(all_hr_entries)):
        if datetime.strptime(all_timestamps[entry], "%Y-%m-%d %H:%M:%S") \
                > average_since:
            hrs_after_time.append(all_hr_entries[entry])
    return hrs_after_time