code: def tf_idf_small_data(preprocess, case_sens, cols=None):
      if cols is None:
          cols = [0, 1]
      input_fr = (
          get_simple_input_test_frame()
          if preprocess
          else get_simple_preprocessed_input_test_frame()
      )
      expected_fr = (
          get_expected_output_frame_case_sens()
          if case_sens
          else get_expected_output_frame_case_insens()
      )
      out_frame = tf_idf(
          input_fr, cols[0], cols[1], preprocess, case_sens
      )
      pyunit_utils.compare_frames(
          expected_fr,
          out_frame,
          len(out_frame),
          tol_numeric=1e-5,
          compare_NA=False,
      )
  
file_path: h2o-3/h2o-py/tests/testdir_algos/tf-idf/pyunit_PUBDEV-6938_tf-idf.py
imports: from collections import OrderedDict
  from h2o import H2OFrame
  from h2o.information_retrieval.tf_idf import tf_idf
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: tf_idf_small_data(preprocess, case_sens, cols) without return types