Fix invalid names in Python code.