def _replace_locals(tok):
 (toknum, tokval) = tok
 if ((toknum == tokenize.OP) and (tokval == '@')):
  return (tokenize.OP, _LOCAL_TAG)
 return (toknum, tokval)

def _replace_locals ( tok ) : ( toknum , tokval ) = tok if ( ( toknum == tokenize . OP ) and ( tokval == '@' ) ) : return ( tokenize . OP , _LOCAL_TAG ) return ( toknum , tokval )
replace local variables with a syntactically valid name .