def get_cardinal_direction(direction: int) -> str:  
ret = '<STR_LIT>'<EOL>if not isinstance(direction, int):<EOL><INDENT>direction = int(direction)<EOL><DEDENT>while direction < <NUM_LIT:0>:<EOL><INDENT>direction += <NUM_LIT><EOL><DEDENT>direction = direction % <NUM_LIT><EOL>if <NUM_LIT> <= direction <= <NUM_LIT> or <NUM_LIT:0> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:N>'<EOL>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:N>'<EOL><DEDENT>ret += '<STR_LIT>'<EOL><DEDENT>elif <NUM_LIT:12> <= direction <= <NUM_LIT>:<EOL><INDENT>if <NUM_LIT:12> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:N>'<EOL><DEDENT>ret += '<STR_LIT:E>'<EOL><DEDENT><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:S>'<EOL>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:S>'<EOL><DEDENT>ret += '<STR_LIT:E>'<EOL><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:S>'<EOL><DEDENT>ret += '<STR_LIT>'<EOL><DEDENT><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT:E>'<EOL>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT>'<EOL>if <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT>elif <NUM_LIT> <= direction <= <NUM_LIT>:<EOL><INDENT>ret += '<STR_LIT>'<EOL><DEDENT><DEDENT>return ret<EOL>
Returns the cardinal direction (NSEW) for a degree direction

Wind Direction - Cheat Sheet:

(360) -- 011/012 -- 033/034 -- (045) -- 056/057 -- 078/079 -- (090)

(090) -- 101/102 -- 123/124 -- (135) -- 146/147 -- 168/169 -- (180)

(180) -- 191/192 -- 213/214 -- (225) -- 236/237 -- 258/259 -- (270)

(270) -- 281/282 -- 303/304 -- (315) -- 326/327 -- 348/349 -- (360)