def wxcode(code: str) -> str:
if not code:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>ret = '<STR_LIT>'<EOL>if code[<NUM_LIT:0>] == '<STR_LIT:+>':<EOL><INDENT>ret = '<STR_LIT>'<EOL>code = code[<NUM_LIT:1>:]<EOL><DEDENT>elif code[<NUM_LIT:0>] == '<STR_LIT:->':<EOL><INDENT>ret = '<STR_LIT>'<EOL>code = code[<NUM_LIT:1>:]<EOL><DEDENT>if len(code) not in [<NUM_LIT:2>, <NUM_LIT:4>, <NUM_LIT:6>]:<EOL><INDENT>return code<EOL><DEDENT>for _ in range(len(code) // <NUM_LIT:2>):<EOL><INDENT>if code[:<NUM_LIT:2>] in WX_TRANSLATIONS:<EOL><INDENT>ret += WX_TRANSLATIONS[code[:<NUM_LIT:2>]] + '<STR_LIT:U+0020>'<EOL><DEDENT>else:<EOL><INDENT>ret += code[:<NUM_LIT:2>]<EOL><DEDENT>code = code[<NUM_LIT:2>:]<EOL><DEDENT>return ret.strip()<EOL>
Translates weather codes into readable strings

Returns translated string of variable length