Utility methods for Python