def get_closer(a, b, test_val):
    """Returns which ever of a or b is closer to test_val"""
    diff_a = abs(a - test_val)
    diff_b = abs(b - test_val)
    if diff_a < diff_b:
        return a
    else:
        return b