def return_timings(data, trial_type):
    """
    Finds all trials matching the string 'trial_type',
    retrieves onset in seconds, and returns them as a list.
    """
    data = filter(lambda d: trial_type in d[0], data)

    onsets = []
    for trial in data:
        onsets.append(trial[5])

    return onsets