code: def _get_hash_v2(
      fra_proto: fra.ForwardRateAgreement,
  ) -> Tuple[
      int,
      types.CurrencyProtoType,
      period_pb2.Period,
      rate_indices.RateIndex,
  ]:
      """Computes hash key for the batching strategy."""
      currency = currencies.from_proto_value(fra_proto.currency)
      bank_holidays = fra_proto.bank_holidays
      daycount_convention = fra_proto.daycount_convention
      business_day_convention = fra_proto.business_day_convention
      # Get rate index
      rate_index = fra_proto.floating_rate_term.floating_rate_type
      rate_index = rate_indices.RateIndex.from_proto(rate_index)
  
      rate_term = fra_proto.floating_rate_term.term
      rate_type, multiplier = _frequency_and_multiplier(rate_term.type)
      h = utils.hasher(
          [
              bank_holidays,
              daycount_convention,
              business_day_convention,
              rate_type,
          ]
      )
      return (
          h,
          currency,
          (rate_type, [multiplier * rate_term.amount]),
          rate_index,
      )
  
imports: from typing import Any, List, Dict, Tuple
  import tensorflow.compat.v2
  from tf_quant_finance.experimental.pricing_platform.framework import utils
  from tf_quant_finance.experimental.pricing_platform.framework.core import business_days
  from tf_quant_finance.experimental.pricing_platform.framework.core import currencies
  from tf_quant_finance.experimental.pricing_platform.framework.core import curve_types
  from tf_quant_finance.experimental.pricing_platform.framework.core import daycount_conventions
  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.rate_instruments import cashflow_streams
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments import utils
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments.interest_rate_swap 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 a global function with example usage: _get_hash_v2(fra_proto) and returns: h,  currency,  rate_type,  list,  rate_index