<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _normalize_direction(heading: int) -> int: """ Make sure that 0 < heading < 360 Args: heading: base heading Returns: corrected heading """

        while heading > 359:
            heading = int(heading - 359)
        while heading < 0:
            heading = int(heading + 359)
        return heading