Moved utils/general.py from the engine