def max_in(values):
    """
    Returns the largest value in `values`,
     or `None` if the input list is empty.
    """
    max_value = None
    for v in values:
        if max_value is None or v > max_value:
            max_value = v
    return max_value