This is nowhere close to the 80 char line length limit.    Blocks like this should be reduced to just a couple of lines for readability.

Also in cases like this where you test a condition and then return the result of that test.  For example, what is written here is of the form 

```python
if (complicated expr):
   return True
else:
    return False
```

Instead this should just be:

```python
return (complicated expr)
```