code: def compareModels(h2oModel, smModel):
      h2o_deviance = old_div(
          h2oModel.residual_deviance(), h2oModel.null_deviance()
      )
      sm_deviance = old_div(smModel.deviance, smModel.null_deviance)
      difference = h2o_deviance - sm_deviance
      print(
          "Difference between h2o Model and sm Model deviance measure: {0}".format(
              difference
          )
      )
  
      assert (
          difference < 0.01
      ), "expected h2o to have an equivalent or better deviance measures"
  
file_path: h2o-3/h2o-py/tests/testdir_algos/glm/pyunit_link_functions_negbinomial_glm.py
imports: from past.utils import old_div
  import sys
  import h2o
  from tests import pyunit_utils
  import pandas
  import zipfile
  import statsmodels.api
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: compareModels(h2oModel, smModel) without return types