def starts(epsilon=0):
    """Returns a function that computes whether a temporal interval has the
    same start time as another interval (+/- epsilon), and ends before it.

    The output function expects two temporal intervals (dicts with keys 't1'
    and 't2' for the start and end times, respectively). It returns ``True`` if
    the first interval starts at the same time as the second interval (+/-
    ``epsilon``), and the first interval ends before the second interval.

    Args:
        epsilon: The maximum difference between the start time of the first
            interval and the start time of the second interval.

    Returns:
        An output function that takes two temporal intervals and returns
        ``True`` if the first interval starts at the same time as the second
        interval, and ends before the second interval ends.
    """
    return lambda intrvl1, intrvl2: abs(intrvl1['t1'] - intrvl2['t1']
        ) <= epsilon and intrvl1['t2'] < intrvl2['t2']
