Refactored inferState to not write to std::cout, now available from Python API