code: def group_protos(
      proto_list: List[swaption_proto.Swaption],
      config: "SwaptionConfig" = None,
  ) -> Dict[str, Any]:
      """Creates a dictionary of grouped protos."""
      del config
  
      grouped_swaptions = {}
      for swaption_instance in proto_list:
          h, _ = get_hash(swaption_instance)
          if h in grouped_swaptions:
              grouped_swaptions[h].append(swaption_instance)
          else:
              grouped_swaptions[h] = [swaption_instance]
      return grouped_swaptions
  
imports: from typing import Any, Dict, List, Tuple
  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 swaption_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: group_protos(proto_list, config) and returns: grouped_swaptions