def _clean(zipcode, valid_length=_valid_zipcode_length):
zipcode = zipcode.split("<STR_LIT:->")[<NUM_LIT:0>]  <EOL>if len(zipcode) != valid_length:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>if _contains_nondigits(zipcode):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return zipcode<EOL>
Assumes zipcode is of type `str`