def getThrusterFiringIntervalBefore(tfIndices, minDuration = 10):
    """Returns range of points between last two thruster firings in input

    See getThrusterFiringIntervalAfter() for more details. This
    function does the same job, but returns the last two indices
    in the array  meeting the criteria.

    """

    nTfi = len(tfIndices)
    if nTfi == 0:
        return None, None

    if nTfi == 1:
        return 0, tfIndices[0]

    i = len(tfIndices)-1
    while i > 1:
        if tfIndices[i-1] + minDuration < tfIndices[i]:
            return tfIndices[i-1], tfIndices[i]
        i -= 1
    return None, None