Utility methods in python