for an_infected_timestamp in list(infected_users.keys()):
    current_infected_users = infected_users[an_infected_timestamp]
for a_clean_timestamp in list(clean_users.keys()):
    if time_stamp_in_delta(an_infected_timestamp, a_clean_timestamp):
        current_clean_users = clean_users[a_clean_timestamp]
infected_users.close()
clean_users.close()
Отслеживание контактов в Python — работа с временными рядами