code: def assert_group_by_result(h2oFrame, answer_dict, row_name):
      """
      Given a result frame h2oFrame, a dictionary containing the answers to the group by operation and
      row_name denoting which groupby group to examine, this method will throw an error if result
      frame does not agree with dict values or the wrong group name is provided.
  
      :param h2oFrame:
      :param answer_dict:
      :param row_name:
      """
      row_ind = -1
      for ind in range(h2oFrame.nrow):
          if row_name == h2oFrame[ind, 0]:
              row_ind = ind
              break
      assert (
          row_ind >= 0
      ), "row_name is not a valid row name in your result frame."
  
      for key, value in answer_dict.items():
          assert (
              abs(value - h2oFrame[row_ind, key]) < 1e-10
          ), "H2O group_by() command is not working."
  
file_path: h2o-3/h2o-py/tests/testdir_munging/pyunit_groupby_allOps.py
imports: import sys
  import h2o
  import math
  from tests import pyunit_utils
  from h2o.utils.typechecks import assert_is_type
  from h2o.frame import H2OFrame
label_desc: Use image node_id 4 for calling a global function with example usage: assert_group_by_result(h2oFrame, answer_dict, row_name) without return types