code: def update_rate_index(
      current_index: rate_indices.RateIndex,
      index: rate_indices.RateIndex,
  ):
      """Creates a dictionary of grouped protos."""
      if current_index.type != index.type:
          raise ValueError(
              f"Can not join {current_index.type} and {index.type}"
          )
      current_index.name = current_index.name + index.name
      current_index.source = current_index.source + index.source
  
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 8 for calling a global function with example usage: update_rate_index(current_index, index) without return types