Probably best to define seq_exceeds_homopolymers here, inside of check_homopolymers:

```python
    pat = compile('A{max_homopolymer+1} | T{max_homopolymer+1} | G{max_homopolymer+1} | C{max_homopolymer+1}')
    def seq_exceeds_homopolymers(curr_seq):
        if pat.search(curr_seq):
            return True

        return False
```