def lookup_prev_stage_start(stage_boundaries, t):
    
    """
    Returns the previous stage start timestamp from a list/set of stage 
    boundaries and current time.
    """
    
    return max([0] + [x for x in stage_boundaries if x <= t])