def end_time(data):
    """
    Gets the final timestamp of the trial.
    """
    try:
        et = data['trial_data']['timestamp'][-1]
    except IndexError:
        print(data)
        et = 0
    return et