def METHOD_NAME(dataset, iterations):
    train_pool, test_pool = _get_train_test_pool(dataset)
    model = CatBoost({'iterations': iterations, 'random_seed': 0, 'loss_function': 'Logloss'})
    model.fit(train_pool)
    pred_model = model.predict(test_pool, prediction_type='RawFormulaVal')
    model_py = yatest.common.test_output_path('model.py')
    model.save_model(model_py, format="python", pool=train_pool)
    scope = {}
    exec(open(model_py).read(), scope)
    pred_python = _predict_python_on_test(dataset, scope['apply_catboost_model'])
    assert _check_data(pred_model, pred_python)