class_docstr: Represents a batch of Forward Rate Agreements (FRA).
  
  An FRA is a contract for the period [T, T+tau] where the holder exchanges a
  fixed rate (agreed at the start of the contract) against a floating payment
  determined at time T based on the spot Libor rate for term `tau`. The
  cashflows are exchanged at the settlement time T_s, which is either equal to T
  or close to T. See, e.g., [1].
  
  The ForwardRateAgreement class can be used to create and price multiple FRAs
  simultaneously. However all FRAs within an FRA object must be priced using
  a common reference and discount curve.
  
  #### Example:
  The following example illustrates the construction of an FRA instrument and
  calculating its price.
  
  ```python
  RateIndex = instrument_protos.rate_indices.RateIndex
  
  fra = fra_pb2.ForwardRateAgreement(
      short_position=True,
      fixing_date=date_pb2.Date(year=2021, month=5, day=21),
      currency=Currency.USD(),
      fixed_rate=decimal_pb2.Decimal(nanos=31340000),
      notional_amount=decimal_pb2.Decimal(units=10000),
      daycount_convention=DayCountConventions.ACTUAL_360(),
      business_day_convention=BusinessDayConvention.MODIFIED_FOLLOWING(),
      floating_rate_term=fra_pb2.FloatingRateTerm(
          floating_rate_type=RateIndex(type="LIBOR_3M"),
          term = period_pb2.Period(type="MONTH", amount=3)),
      settlement_days=2)
  date = [[2021, 2, 8], [2022, 2, 8], [2023, 2, 8], [2025, 2, 8],
          [2027, 2, 8], [2030, 2, 8], [2050, 2, 8]]
  discount = [0.97197441, 0.94022746, 0.91074031, 0.85495089, 0.8013675,
              0.72494879, 0.37602059]
  market_data_dict = {
      "rates": {
          "USD": {
              "risk_free_curve": {
                  "dates": dates,
                  "discounts": discounts,
              },
              "LIBOR_3M": {
                  "dates": dates,
                  "discounts": discounts,
              }
          }
      },
      "reference_date": [(2020, 2, 8)],
  }
  market = market_data.MarketDataDict(market_data_dict)
  fra_portfolio = forward_rate_agreement.ForwardRateAgreement.from_protos([fra])
  fra_portfolio[0].price(market)
  # Expected result: [4.05463257]
  ```
  
  #### References:
  [1]: Leif B.G. Andersen and Vladimir V. Piterbarg. Interest Rate Modeling,
      Volume I: Foundations and Vanilla Models. Chapter 5. 2010.
docstr: Creates a dictionary to initialize ForwardRateAgreement.
  
  The output dictionary is such that the instruments can be initialized
  as follows:
  ```
  initializer = create_constructor_args(proto_list, config)
  fras = [ForwardRateAgreement(**data) for data in initializer.values()]
  ```
  
  The keys of the output dictionary are unique identifiers of the batched
  instruments. This is useful for identifying an existing graph that could be
  reused for the instruments without the need of rebuilding the graph.
  
  Args:
    proto_list: A list of protos for which the initialization arguments are
      constructed.
    config: An instance of `ForwardRateAgreementConfig`.
  
  Returns:
    A possibly nested dictionary such that each value provides initialization
    arguments for the ForwardRateAgreement.
docstr_tok: ["Creates","a","dictionary","to","initialize","ForwardRateAgreement",".","The","output","dictionary","is","such","that","the","instruments","can","be","initialized","as","follows",":","``","`","initializer","=","create_constructor_args","(","proto_list",",","config",")","fras","=","[","ForwardRateAgreement","(","*","*","data",")","for","data","in","initializer.values","(",")","]","``","`","The","keys","of","the","output","dictionary","are","unique","identifiers","of","the","batched","instruments",".","This","is","useful","for","identifying","an","existing","graph","that","could","be","reused","for","the","instruments","without","the","need","of","rebuilding","the","graph",".","Args",":","proto_list",":","A","list","of","protos","for","which","the","initialization","arguments","are","constructed",".","config",":","An","instance","of","`","ForwardRateAgreementConfig","`",".","Returns",":","A","possibly","nested","dictionary","such","that","each","value","provides","initialization","arguments","for","the","ForwardRateAgreement","."]
code: def create_constructor_args(
      cls,
      proto_list: List[fra.ForwardRateAgreement],
      config: ForwardRateAgreementConfig = None,
  ) -> Dict[str, Any]:
      """Creates a dictionary to initialize ForwardRateAgreement.
  
      The output dictionary is such that the instruments can be initialized
      as follows:
      ```
      initializer = create_constructor_args(proto_list, config)
      fras = [ForwardRateAgreement(**data) for data in initializer.values()]
      ```
  
      The keys of the output dictionary are unique identifiers of the batched
      instruments. This is useful for identifying an existing graph that could be
      reused for the instruments without the need of rebuilding the graph.
  
      Args:
        proto_list: A list of protos for which the initialization arguments are
          constructed.
        config: An instance of `ForwardRateAgreementConfig`.
  
      Returns:
        A possibly nested dictionary such that each value provides initialization
        arguments for the ForwardRateAgreement.
      """
      fra_data = proto_utils.from_protos_v2(proto_list, config)
      res = {}
      for key in fra_data:
          tensor_repr = proto_utils.tensor_repr(fra_data[key])
          res[key] = tensor_repr
      return res
  
imports: from typing import Any, Optional, List, Dict, Union
  import dataclasses
  import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance.experimental.pricing_platform.framework.core import curve_types
  from tf_quant_finance.experimental.pricing_platform.framework.core import instrument
  from tf_quant_finance.experimental.pricing_platform.framework.core import processed_market_data
  from tf_quant_finance.experimental.pricing_platform.framework.core import rate_indices
  from tf_quant_finance.experimental.pricing_platform.framework.core import types
  from tf_quant_finance.experimental.pricing_platform.framework.market_data import utils
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments import cashflow_streams
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments.forward_rate_agreement import proto_utils
  from tf_quant_finance.experimental.pricing_platform.instrument_protos import forward_rate_agreement_pb2
  from tf_quant_finance.experimental.pricing_platform.instrument_protos import period_pb2
label_desc: Use image node_id 2 for calling the ForwardRateAgreement obj's underlying member method code with example usage: obj.create_constructor_args(cls, proto_list, config) and returns: res