code: def test_from_proto_price(self):
      market = market_data.MarketDataDict(self._market_data_dict)
      fra_portfolio = (
          forward_rate_agreement.ForwardRateAgreement.from_protos(
              [self._fra_1, self._fra_2, self._fra_3]
          )
      )
      with self.subTest("Batching"):
          self.assertLen(fra_portfolio, 2)
      price1 = fra_portfolio[0].price(market)
      expected1 = np.array([4.05463257, 4.05463257])
      with self.subTest("PriceBatch"):
          self.assertAllClose(price1, expected1)
      price2 = fra_portfolio[1].price(market)
      expected2 = np.array([-5.10228969])
      with self.subTest("PriceSingle"):
          self.assertAllClose(price2, expected2)
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/forward_rate_agreement/forward_rate_agreement_test.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the ForwardRateAgreementTest obj's underlying member method code with example usage: obj.test_from_proto_price() without return types