machine learning test code lib