Refactor, remove some parts which is already implemented in python decorator
Count triples example