code: def random_dataset(response_type, verbose=True):
      """Create and return a random dataset."""
      if verbose:
          print(
              "\nCreating a dataset for a %s problem:" % response_type
          )
      fractions = {
          k + "_fraction": random.random()
          for k in "real categorical integer time string binary".split()
      }
      fractions[
          "string_fraction"
      ] = 0  # Right now we are dropping string columns, so no point in having them.
      fractions["binary_fraction"] /= 3
      fractions["time_fraction"] /= 2
      # fractions["categorical_fraction"] = 0
      sum_fractions = sum(fractions.values())
      for k in fractions:
          fractions[k] /= sum_fractions
      response_factors = (
          1
          if response_type == "regression"
          else 2
          if response_type == "binomial"
          else random.randint(10, 30)
      )
      df = h2o.create_frame(
          rows=random.randint(15000, 25000) + NTESTROWS,
          cols=random.randint(20, 100),
          missing_fraction=random.uniform(0, 0.05),
          has_response=True,
          response_factors=response_factors,
          positive_response=True,
          **fractions,
      )
      if verbose:
          print()
          df.show()
      return df
  
file_path: h2o-3/h2o-py/tests/testdir_javapredict/pyunit_mojo.py
imports: import csv
  import os
  import random
  import shutil
  import subprocess
  import sys
  import tempfile
  import time
  import tabulate
  from tests import pyunit_utils
  import h2o
  from h2o.estimators import H2ORandomForestEstimator, H2OGradientBoostingEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: random_dataset(response_type, verbose) and returns: df