code: def test_infogram_german_data():
      """
      Simple german data test to check that safe infogram is working:
       1. it generates the correct lists as Deep's original code.
       2. when model and infogram parameters are specified, it uses the correct specification.
      :return:
      """
      deep_rel = [
          1.00000000,
          0.58302027,
          0.43431236,
          0.66177924,
          0.53677082,
          0.25084764,
          0.34379833,
          0.13251726,
          0.11473028,
          0.09548423,
          0.20398740,
          0.16432640,
          0.06875276,
          0.04870468,
          0.12573930,
          0.01382682,
          0.04496173,
          0.01273963,
      ]
      deep_cmi = [
          0.84946975,
          0.73020930,
          0.58553936,
          0.75780528,
          1.00000000,
          0.38461582,
          0.57575695,
          0.30663930,
          0.07604779,
          0.19979514,
          0.42293369,
          0.20628365,
          0.25316918,
          0.15096705,
          0.24501686,
          0.11296778,
          0.13068605,
          0.03841617,
      ]
      fr = h2o.import_file(
          path=pyunit_utils.locate(
              "smalldata/admissibleml_test/german_credit.csv"
          )
      )
      target = "BAD"
      fr[target] = fr[target].asfactor()
      x = fr.names
      x.remove(target)
      x.remove("status_gender")
      x.remove("age")
      infogram_model = H2OInfogram(
          seed=12345,
          protected_columns=["status_gender", "age"],
          top_n_features=50,
      )
      infogram_model.train(x=x, y=target, training_frame=fr)
  
      # make sure our result matches Deep's
      pred_names, rel = infogram_model.get_all_predictor_relevance()
      x, cmi = infogram_model.get_all_predictor_cmi()
      assert (
          deep_rel.sort() == rel.sort()
      ), "Expected: {0}, actual: {1}".format(deep_rel, rel)
      assert (
          deep_cmi.sort() == cmi.sort()
      ), "Expected: {0}, actual: {1}".format(deep_cmi, cmi)
  
      gbm_params = {"ntrees": 3}
      infogram_model_gbm_glm = H2OInfogram(
          seed=12345,
          protected_columns=["status_gender", "age"],
          top_n_features=50,
          algorithm="gbm",
          algorithm_params=gbm_params,
      )
      infogram_model_gbm_glm.train(x=x, y=target, training_frame=fr)
      x, cmi_gbm_glm = infogram_model_gbm_glm.get_all_predictor_cmi()
      assert abs(cmi_gbm_glm[1] - cmi[1]) > 0.01, (
          "CMI from infogram model with gbm using different number of trees should"
          " be different but are not."
      )
  
imports: import os
  import sys
  import h2o
  from h2o.estimators.infogram import H2OInfogram
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_infogram_german_data() without return types