code: def run_comparison_tests(
      auto_encoder,
      act_fun,
      missing_values_handling,
      set_all_factor,
      train,
      test,
      x,
  ):
      # set deeplearning model parameters
      params = set_params(
          act_fun, missing_values_handling, set_all_factor, auto_encoder
      )
  
      if auto_encoder:
          try:
              # build and save mojo model
              deeplearning_model = build_save_model(params, x, train)
          except Exception as err:
              if not (
                  "Trying to predict with an unstable model"
                  in err.args[0]
              ):
                  raise Exception(
                      "Deeplearning autoencoder model failed to build.  Fix it."
                  )
              return
      else:
          # build and save mojo model
          deeplearning_model = build_save_model(params, x, train)
  
      # save test file, h2o predict/mojo use same file
      h2o.download_csv(test[x], os.path.join(TMPDIR, "in.csv"))
      # load model and perform predict
      pred_h2o, pred_mojo = pyunit_utils.mojo_predict(
          deeplearning_model, TMPDIR, MOJONAME
      )
      pred_pojo = pyunit_utils.pojo_predict(
          deeplearning_model, TMPDIR, MOJONAME
      )
      # save model for debugging
      h2o.save_model(deeplearning_model, path=TMPDIR, force=True)
      print("Comparing mojo predict and h2o predict...")
      pyunit_utils.compare_frames_local_onecolumn_NA(
          pred_h2o, pred_mojo, prob=1, tol=1e-10
      )
      print("Comparing pojo predict and h2o predict...")
      pyunit_utils.compare_frames_local_onecolumn_NA(
          pred_mojo, pred_pojo, prob=1, tol=1e-10
      )
  
file_path: h2o-3/h2o-py/tests/testdir_javapredict/pyunit_pubdev_6231_deeplearning_mojo_pojo_large.py
imports: from builtins import range
  import sys, os
  import h2o
  from tests import pyunit_utils
  import random
  import re
  from h2o.estimators.deeplearning import H2ODeepLearningEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: run_comparison_tests(auto_encoder, act_fun, missing_values_handling, set_all_factor, train, test, x) without return types