docstr: Test that from_protos keeps pay leg as a fixed leg.
code: def test_from_protos(self):
      """Test that from_protos keeps pay leg as a fixed leg."""
      values_dict = proto_utils.from_protos([self._swap_2])
      values = list(values_dict.values())[0]
      # Notional amounts should have negative sign
      pay_leg_notional = values["pay_leg"].notional_amount[0]
      receive_leg_notional = values["receive_leg"].notional_amount[0]
      with self.subTest("PayLegNotional"):
          self.assertEqual(pay_leg_notional, -self._receive_notional)
      with self.subTest("PayLegFixed"):
          self.assertEqual(
              type(values["pay_leg"]),
              rate_instruments.coupon_specs.FixedCouponSpecs,
          )
      with self.subTest("ReceiveLegNotional"):
          self.assertEqual(receive_leg_notional, -self._pay_notional)
      with self.subTest("ReceiveLegFixed"):
          self.assertEqual(
              type(values["receive_leg"]),
              rate_instruments.coupon_specs.FloatCouponSpecs,
          )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/interest_rate_swap/proto_utils_test.py
imports: import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments.interest_rate_swap import proto_utils
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 3 for calling the ProtoUtilsTest obj's underlying member method code with example usage: obj.test_from_protos() without return types