code: def _assert_keys_values(
      self, iterator, expected_keys=None, expected_values=None
  ):
      key_lists, values = zip(*list(iterator))
      keys = ["_".join(k) for k in key_lists]
      if expected_keys is not None and expected_values is not None:
          result_dict = {k: v for k, v in zip(keys, values)}
          expected_dict = {
              k: v for k, v in zip(expected_keys, expected_values)
          }
          self.assertDictEqual(result_dict, expected_dict)
          return
  
      if expected_keys is not None:
          self.assertSameElements(keys, expected_keys)
          return
  
      if expected_values is not None:
          self.assertSameElements(values, expected_values)
  
file_path: tf-quant-finance/tf_quant_finance/utils/tf_functions_test.py
imports: from typing import Dict
  import dataclasses
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the TfFunctionsTest obj's underlying member method code with example usage: obj._assert_keys_values(iterator, expected_keys, expected_values) without return types