FYI I had problems with `filter` not working properly, so I used other functions to accomplish the same thing. And don't you need to import it from `six`?