Trying to implement some of FakeRat functionality in python