def _select_points(a, list_like):
    """
    returns one above a, one below a, and the third
    closest point to a sorted in ascending order
    for quadratic interpolation. Assumes that points
    above and below a exist.
    """
    foo = [x for x in list(list_like) if x-a <= 0]
    z = [min(foo, key=lambda x : abs(x-a))]
    
    foo = [x for x in list(list_like) if x-a > 0]
    z.append(min(foo, key=lambda x : abs(x-a)))
    
    foo = [x for x in list(list_like) if x not in z]
    z.append(min(foo, key=lambda x : abs(x-a)))
    
    return sorted(z)