code: def test_handle_orig_values():
      type_test = ["Regression", "Binomial", "Multinomial"]
      paths = [
          "smalldata/titanic/titanic_expanded.csv",
          "smalldata/logreg/prostate.csv",
          "smalldata/iris/iris2.csv",
      ]
      ys = ["fare", "CAPSULE", "response"]
      names_to_extract = ["name", None, None]
      targets = [None, None, "setosa"]
      colormap = "plasma"
  
      for test_id in range(len(paths)):
          train = h2o.upload_file(pyunit_utils.locate(paths[test_id]))
          if type_test[test_id] in ["Binomial", "Multinomial"]:
              train[ys[test_id]] = train[ys[test_id]].asfactor()
  
          gbm = H2OGradientBoostingEstimator(
              seed=1234, model_id="my_awesome_model_py" + str(test_id)
          )
          gbm.train(y=ys[test_id], training_frame=train)
  
          cols_to_test = _get_cols_to_test(train, ys[test_id])
          print(cols_to_test)
          if names_to_extract[test_id] is not None:
              if names_to_extract[test_id] in cols_to_test:
                  cols_to_test.remove(names_to_extract[test_id])
  
          plt = get_matplotlib_pyplot(
              False, raise_if_not_available=True
          )
          frame = train.sort(gbm.actual_params["response_column"])
          for column in cols_to_test:
              is_factor = frame[column].isfactor()[0]
              if is_factor:
                  factor_map = _factor_mapper(
                      NumpyFrame(frame[column]).from_factor_to_num(
                          column
                      )
                  )
              deciles = [
                  int(round(frame.nrow * dec / 10)) for dec in range(11)
              ]
              deciles[10] = frame.nrow - 1
              colors = plt.get_cmap(colormap, 11)(list(range(11)))
              for i, index in enumerate(deciles):
                  percentile_string = "{}th Percentile".format(i * 10)
                  if targets[test_id] is not None:
                      target = [targets[test_id]]
                  else:
                      target = None
                  pp_data = gbm.partial_plot(
                      frame,
                      cols=[column],
                      plot=False,
                      row_index=index,
                      targets=target,
                      nbins=100
                      if not is_factor
                      else 1 + frame[column].nlevels()[0],
                      include_na=True,
                  )[0]
                  encoded_col = pp_data.col_header[0]
                  factor_map = (
                      _factor_mapper(
                          NumpyFrame(frame[column]).from_factor_to_num(
                              column
                          )
                      )
                      if is_factor
                      else None
                  )
                  orig_value = frame.as_data_frame(
                      use_pandas=False, header=False
                  )[index][frame.col_names.index(column)]
                  orig_value_prediction = NumpyFrame(
                      _handle_orig_values(
                          is_factor,
                          pp_data,
                          encoded_col,
                          plt,
                          target,
                          gbm,
                          frame,
                          index,
                          column,
                          colors[i],
                          percentile_string,
                          factor_map,
                          orig_value,
                      )
                  )
  
                  if (
                      is_factor
                      and math.isnan(
                          factor_map([frame[index, column]])[0]
                      )
                  ) or (
                      not is_factor and math.isnan(frame[index, column])
                  ):
                      orig_test_value = orig_value_prediction[
                          "mean_response"
                      ][orig_value_prediction.nrow - 1]
                  else:
                      orig_test_value = orig_value_prediction[
                          "mean_response"
                      ]
  
                  if type_test[test_id] == "Regression":
                      assert (
                          gbm.training_model_metrics()["model_category"]
                          == "Regression"
                      )
                      np.testing.assert_almost_equal(
                          orig_test_value,
                          gbm.predict(frame).as_data_frame()["predict"][
                              index
                          ],
                          5,
                      )
                  elif type_test[test_id] == "Binomial":
                      assert (
                          gbm.training_model_metrics()["model_category"]
                          == "Binomial"
                      )
                      np.testing.assert_almost_equal(
                          orig_test_value,
                          gbm.predict(frame).as_data_frame()["p1"][
                              index
                          ],
                          5,
                      )
                  elif type_test[test_id] == "Multinomial":
                      assert (
                          gbm.training_model_metrics()["model_category"]
                          == "Multinomial"
                      )
                      np.testing.assert_almost_equal(
                          orig_test_value,
                          gbm.predict(frame).as_data_frame()[
                              targets[test_id]
                          ][index],
                          5,
                      )
  
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 2 for calling a global function with example usage: test_handle_orig_values() without return types