code: def binomial_model(ModelType, custom_metric_func, params={}):
      (ftrain, fvalid, ftest) = dataset_prostate()
      model = ModelType(
          model_id="binomial",
          score_each_iteration=True,
          custom_metric_func=custom_metric_func,
          **params,
      )
      model.train(
          y="CAPSULE",
          x=ftrain.names,
          training_frame=ftrain,
          validation_frame=fvalid,
      )
      return model, ftest
  
imports: import h2o
  from .None import locate
label_desc: Use image node_id 9 for calling a global function with example usage: binomial_model(ModelType, custom_metric_func, params) and returns: model,  ftest