code: def _get_legs_hash_key_v2(
      leg_1: ir_swap.SwapLeg, leg_2: ir_swap.SwapLeg
  ) -> Tuple[bool, List[Any]]:
      """Computes hash keys for the legs in order to perform batching."""
      # Batching is performed on start_date, end_date, float_rate_type (if it is
      # associated with the same CurveType), fixed_rate, notional amount,
      # settlement days, and basis points.
      pay_leg_key_1, pay_leg_key_2 = _get_keys_v2(leg_1)
      receive_leg_key_1, receive_leg_key_2 = _get_keys_v2(leg_2)
      key_1 = pay_leg_key_1 + pay_leg_key_2
      key_2 = receive_leg_key_1 + receive_leg_key_2
      flip_legs = False
      # If this is a vanilla swap, keep pay_leg fixed and receive_leg float
      if pay_leg_key_1[0] is None and receive_leg_key_1[0] is not None:
          flip_legs = True
      if flip_legs:
          return flip_legs, key_2 + key_1
      else:
          return flip_legs, key_1 + key_2
  
imports: from typing import Any, Dict, List, Tuple, Union
  import tensorflow.compat.v2
  from tf_quant_finance import datetime
  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.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 import coupon_specs
  from tf_quant_finance.experimental.pricing_platform.framework.rate_instruments import utils
  from tf_quant_finance.experimental.pricing_platform.instrument_protos import interest_rate_swap_pb2
label_desc: Use image node_id 23 for calling a global function with example usage: _get_legs_hash_key_v2(leg_1, leg_2) and returns: flip_legs,  unknown, flip_legs,  unknown