Too complicated of a fix for autopep8, but I think this would read better as 
``` python
response = ((imxx * imy ** 2 + imyy * imx ** 2 - 2 * imxy * imx * imy)
            / (imx ** 2 + imy ** 2))
```