It looks like there's a lot of wrong indentation, and I believe it's because there are three actual tab characters here instead of 12 spaces (this happens later on in the file multiple times).