code: def assert_coeffs_equal(coeffStandard, coeff, training_data):
      interceptOffset = 0
      for key in coeffStandard.keys():
          temp1 = coeffStandard[key]
          temp2 = coeff[key]
          if abs(temp1 - temp2) > 1e-6:
              if not (key == "Intercept"):
                  colIndex = int(float(key.split("C")[1])) - 1
                  interceptOffset = (
                      interceptOffset
                      + temp2 * training_data[colIndex].mean()[0, 0]
                  )
                  temp2 = temp2 * math.sqrt(
                      training_data[colIndex].var()
                  )
                  assert (
                      abs(temp1 - temp2) < 1e-6
                  ), "Expected: {0}, Actual: {1} at col: {2}".format(
                      temp2, temp1, key
                  )
      temp1 = coeffStandard["Intercept"]
      temp2 = coeff["Intercept"] + interceptOffset
      assert (
          abs(temp1 - temp2) < 1e-6
      ), "Expected: {0}, Actual: {1} at Intercept".format(temp2, temp1)
  
file_path: h2o-3/h2o-py/tests/testdir_algos/glm/pyunit_pubdev_7238_standardized_coeff_check.py
imports: from builtins import range
  import sys
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
  import math
label_desc: Use image node_id 4 for calling a global function with example usage: assert_coeffs_equal(coeffStandard, coeff, training_data) without return types