def _choose_closest(values, target):
    """
    Find the number in the list of values that is closest to the target. 
    Prefer the first in the list.
    
    """
    closest = values[0]
    for value in values:
        if abs(target - value) < abs(target - closest):
            closest = value

    return closest