code: def _normalize_direction(heading: int) -> int:
          
          while heading > 359:
              heading = int(heading - 359)
          while heading < 0:
              heading = int(heading + 359)
          return heading
docs: Make sure that 0 < heading < 360
  
          Args:
              heading: base heading
  
          Returns: corrected heading