def remove_leading_zeros(num: str) -> str:
if not num:<EOL><INDENT>return num<EOL><DEDENT>if num.startswith('<STR_LIT:M>'):<EOL><INDENT>ret = '<STR_LIT:M>' + num[<NUM_LIT:1>:].lstrip('<STR_LIT:0>')<EOL><DEDENT>elif num.startswith('<STR_LIT:->'):<EOL><INDENT>ret = '<STR_LIT:->' + num[<NUM_LIT:1>:].lstrip('<STR_LIT:0>')<EOL><DEDENT>else:<EOL><INDENT>ret = num.lstrip('<STR_LIT:0>')<EOL><DEDENT>return '<STR_LIT:0>' if ret in ('<STR_LIT>', '<STR_LIT:M>', '<STR_LIT:->') else ret<EOL>
Strips zeros while handling -, M, and empty strings