Helper funtions / classes in Python