class_docstr: Test class that extends tf.test.TestCase with extra functionality.
docstr: Fails if got_values_dict does not match values in expected_values_dict.
  
  For each entry, expected_values_dict provides the row index and the values
  of that row to be compared to the bucketing result in got_values_dict. For
  example:
    got_values_dict={'key', [[1,2,3],[4,5,6],[7,8,9]]}
  you can check the first and last row of got_values_dict[key] by setting
    expected_values_dict={'key', [(0,[1,2,3]), (2,[7,8,9])]}
  
  Args:
    got_values_dict: The dict got, where each value represents a full
      bucketing result.
    expected_values_dict: The expected dict. It may contain a subset of keys
      in got_values_dict. The value is of type "Iterable[Tuple[int,
      Iterable[scalar]]]", where each Tuple contains the index of a row to be
      checked and the expected values of that row.
    places: The number of decimal places to compare.
docstr_tok: ["Fails","if","got_values_dict","does","not","match","values","in","expected_values_dict",".","For","each","entry",",","expected_values_dict","provides","the","row","index","and","the","values","of","that","row","to","be","compared","to","the","bucketing","result","in","got_values_dict",".","For","example",":","got_values_dict=","{","'key","'",",","[","[","1,2,3","]",",","[","4,5,6","]",",","[","7,8,9","]","]","}","you","can","check","the","first","and","last","row","of","got_values_dict","[","key","]","by","setting","expected_values_dict=","{","'key","'",",","[","(","0",",","[","1,2,3","]",")",",","(","2",",","[","7,8,9","]",")","]","}","Args",":","got_values_dict",":","The","dict","got",",","where","each","value","represents","a","full","bucketing","result",".","expected_values_dict",":","The","expected","dict",".","It","may","contain","a","subset","of","keys","in","got_values_dict",".","The","value","is","of","type","``","Iterable","[","Tuple","[","int",",","Iterable","[","scalar","]","]","]","''",",","where","each","Tuple","contains","the","index","of","a","row","to","be","checked","and","the","expected","values","of","that","row",".","places",":","The","number","of","decimal","places","to","compare","."]
code: def assertDictMatrixRowsAlmostEqual(
      self,
      got_values_dict: Dict[str, Sequence[Iterable[Union[float, int]]]],
      expected_values_dict: Dict[
          str, Iterable[Tuple[int, Iterable[Union[float, int]]]]
      ],
      places: int = 5,
  ) -> None:
      """Fails if got_values_dict does not match values in expected_values_dict.
  
      For each entry, expected_values_dict provides the row index and the values
      of that row to be compared to the bucketing result in got_values_dict. For
      example:
        got_values_dict={'key', [[1,2,3],[4,5,6],[7,8,9]]}
      you can check the first and last row of got_values_dict[key] by setting
        expected_values_dict={'key', [(0,[1,2,3]), (2,[7,8,9])]}
  
      Args:
        got_values_dict: The dict got, where each value represents a full
          bucketing result.
        expected_values_dict: The expected dict. It may contain a subset of keys
          in got_values_dict. The value is of type "Iterable[Tuple[int,
          Iterable[scalar]]]", where each Tuple contains the index of a row to be
          checked and the expected values of that row.
        places: The number of decimal places to compare.
      """
      for key, expected_value in expected_values_dict.items():
          self.assertIn(key, got_values_dict)
          for row, values in expected_value:
              self.assertSequenceAlmostEqual(
                  got_values_dict[key][row],
                  values,
                  places=places,
                  msg_prefix="for key %s, row %d: " % (key, row),
              )
  
imports: import math
  import tempfile
  from typing import Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import constants
  from tensorflow_model_analysis.eval_saved_model import load
  from tensorflow_model_analysis.eval_saved_model import util
  from tensorflow_model_analysis.utils import model_util
label_desc: Use image node_id 8 for calling the TensorflowModelAnalysisTest obj's underlying member method code with example usage: obj.assertDictMatrixRowsAlmostEqual(got_values_dict, expected_values_dict, places) without return types