def find_closest_level(levels, elevation):
    """Find the level closest to the given elevation. """
    closest = None
    difference = float("inf")
    for level in levels:
        level_difference = abs(level.Elevation - elevation)
        if level_difference < difference:
            closest = level
            difference = level_difference
    return closest