the code ``if __name__ == "__main__"`` is duplicated in this file. It should be at the bottom of the file only, and not in the middle of the module. As you added it again after your code, you need to remove line 1187 to line 1189.