utils functions in python