def unit_pos_to_spot(unit_pos) -> ParkingSpot:
min_ = <NUM_LIT:50><EOL>res = None<EOL>for airport in parkings:<EOL><INDENT>for spot in parkings[airport]:  <EOL><INDENT>spot_pos = parkings[airport][spot]  <EOL>dist = math.hypot(unit_pos[<NUM_LIT:0>] - spot_pos[<NUM_LIT:0>], unit_pos[<NUM_LIT:1>] - spot_pos[<NUM_LIT:1>])<EOL>if dist < min_:<EOL><INDENT>min_ = dist  <EOL>res = ParkingSpot(airport=airport, spot=spot)<EOL><DEDENT><DEDENT><DEDENT>return res<EOL>
Translates a unit position to a known parking spot

Args:
    unit_pos: unit position as Vec2

Returns: ParkingSpot object