Sample data extractor + unit test (python)