code: def test_group_protos(self):
      proto_dict = proto_utils.group_protos(
          [self._fra_1, self._fra_2, self._fra_1, self._fra_3]
      )
      with self.subTest("NumGroups"):
          self.assertLen(proto_dict.keys(), 3)
      with self.subTest("CorrectBatches"):
          # One of the lists contains two identical protos
          for proto_list in proto_dict.values():
              if len(proto_list) == 2:
                  self.assertProtoEquals(proto_list[0], proto_list[1])
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/forward_rate_agreement/proto_utils_test.py
imports: import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments.forward_rate_agreement import proto_utils
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the ProtoUtilsTest obj's underlying member method code with example usage: obj.test_group_protos() without return types