code: def test_binary_response_scale():
      train = h2o.upload_file(
          pyunit_utils.locate("smalldata/titanic/titanic_expanded.csv")
      )
      y = "survived"
  
      # get at most one column from each type
      cols_to_test = []
      for col, typ in train.types.items():
          for ctt in cols_to_test:
              if typ == train.types[ctt] or col == y:
                  break
          else:
              cols_to_test.append(col)
  
      gbm = H2OGradientBoostingEstimator(
          seed=1234, model_id="my_awesome_model"
      )
      gbm.train(y=y, training_frame=train)
  
      ice_plot_result = gbm.ice_plot(
          train,
          "title",
          binary_response_scale="logodds",
          output_graphing_data=True,
      )
      assert isinstance(
          ice_plot_result.figure(), matplotlib.pyplot.Figure
      )
      assert isinstance(ice_plot_result, H2OTwoDimTable)
      assert isinstance(
          gbm.ice_plot(train, "age").figure(), matplotlib.pyplot.Figure
      )
      matplotlib.pyplot.close("all")
  
      try:
          gbm.ice_plot(
              train, "title", binary_response_scale="invalid_value"
          )
      except ValueError as e:
          assert (
              str(e) == "Unsupported value for binary_response_scale!"
          )
  
      y = "fare"
      gbm = H2OGradientBoostingEstimator(
          seed=1234, model_id="my_awesome_model"
      )
      gbm.train(y=y, training_frame=train)
  
      try:
          gbm.ice_plot(train, "title", binary_response_scale="logodds")
      except ValueError as e:
          assert (
              str(e)
              == "binary_response_scale cannot be set to 'logodds' value for non-binomial models!"
          )
  
imports: import sys
  import os
  import matplotlib
  import h2o
  import math
  import matplotlib.pyplot
  from tests import pyunit_utils
  from h2o.estimators import *
  from h2o.explanation._explain import *
  from h2o.explanation._explain import _handle_orig_values, _factor_mapper
  from h2o.two_dim_table import H2OTwoDimTable
label_desc: Use image node_id 9 for calling a global function with example usage: test_binary_response_scale() without return types