PY3: fix mldata mock to work with python 3 and 2