code: def test_make_leaderboard_without_leaderboard_frame():
      train = h2o.upload_file(
          pyunit_utils.locate("smalldata/titanic/titanic_expanded.csv")
      )
      train["name"] = train["name"].asfactor()
      y = "fare"
  
      aml = H2OAutoML(seed=1234, max_models=5)
      aml.train(y=y, training_frame=train)
  
      aml2 = H2OAutoML(seed=134, max_models=5)
      aml2.train(y=y, training_frame=train)
  
      grid = H2OGridSearch(
          H2OGradientBoostingEstimator(),
          hyper_params={"ntrees": [1, 2, 3]},
      )
      grid.train(y=y, training_frame=train)
  
      assert h2o.make_leaderboard(aml).nrow > 0
      assert (
          h2o.make_leaderboard(aml).nrow
          == h2o.make_leaderboard(aml).nrow
      )  # creating the same leaderboard doesn't end up with duplicate models
      assert h2o.make_leaderboard(grid).nrow > 0
      assert (
          h2o.make_leaderboard([aml, aml2, grid, aml.leader]).nrow > 0
      )
  
      # without leaderboard frame
      for score_data in ("AUTO", "xval", "valid", "train"):
          assert (
              h2o.make_leaderboard(aml, scoring_data=score_data).nrow
              > 0
          )
          assert (
              h2o.make_leaderboard(
                  [aml, aml2], scoring_data=score_data
              ).nrow
              > 0
          )
          assert (
              h2o.make_leaderboard(grid, scoring_data=score_data).nrow
              > 0
          )
          assert (
              h2o.make_leaderboard(
                  [aml, grid, aml2.leader], scoring_data=score_data
              ).nrow
              > 0
          )
  
      try:
          print(
              h2o.make_leaderboard(
                  aml, extra_columns="predict_time_per_row_ms"
              )
          )
          assert (
              False
          ), "Should fail - Cannot calculate the predict time without leaderboard frame"
      except h2o.exceptions.H2OResponseError:
          pass
  
file_path: h2o-3/h2o-py/tests/testdir_misc/explain/pyunit_make_leaderboard.py
imports: import os
  import sys
  import h2o
  import h2o.exceptions
  from tests import pyunit_utils, dataset_prostate, CustomMaeFunc
  from h2o.automl import H2OAutoML
  from h2o.estimators import *
  from h2o.grid import H2OGridSearch
label_desc: Use image node_id 2 for calling a global function with example usage: test_make_leaderboard_without_leaderboard_frame() without return types