def get_test_status_time_series(test_id, session=None):
    session = session or get_session()
    query = db_utils.model_query(models.TestRun, session=session).filter_by(
        test_id=test_id).values(
            models.TestRun.start_time, models.TestRun.start_time_microsecond,
            models.TestRun.status)
    status_series = {}
    for test_run in query:
        start_time = test_run[0]
        start_time = start_time.replace(microsecond=test_run[1])
        status = test_run[2]
        status_series[start_time] = status
    return status_series
Returns a time series dict of test_run statuses of a single test
dataset/ETHPy150Open openstack-infra/subunit2sql/subunit2sql/db/api.py/get_test_status_time_series