class_docstr: Contains helper methods for managing EventBridge rules for a feature processor.
class_docstr_tok: ["Contains","helper","methods","for","managing","EventBridge","rules","for","a","feature","processor","."]
docstr: Aggregate pipeline events with same desired status.
  
      e.g.
      {
          (FeatureProcessorPipelineExecutionStatus.FAILED,
          FeatureProcessorPipelineExecutionStatus.STOPPED):
              ["pipeline_name_1", "pipeline_name_2"],
          (FeatureProcessorPipelineExecutionStatus.STOPPED,
          FeatureProcessorPipelineExecutionStatus.STOPPED):
              ["pipeline_name_3"],
      }
  Args:
      pipeline_events: List of pipeline events.
  Returns:
      Dict[Tuple, List[str]]: A dictionary of desired status keys and corresponding pipeline
      names.
docstr_tok: ["Aggregate","pipeline","events","with","same","desired","status",".","e.g",".","{","(","FeatureProcessorPipelineExecutionStatus.FAILED",",","FeatureProcessorPipelineExecutionStatus.STOPPED",")",":","[","``","pipeline_name_1","''",",","``","pipeline_name_2","''","]",",","(","FeatureProcessorPipelineExecutionStatus.STOPPED",",","FeatureProcessorPipelineExecutionStatus.STOPPED",")",":","[","``","pipeline_name_3","''","]",",","}","Args",":","pipeline_events",":","List","of","pipeline","events",".","Returns",":","Dict","[","Tuple",",","List","[","str","]","]",":","A","dictionary","of","desired","status","keys","and","corresponding","pipeline","names","."]
code: def _aggregate_pipeline_events_with_same_desired_status(
      self, pipeline_events: List[FeatureProcessorPipelineEvents]
  ) -> Dict[Tuple, List[str]]:
      """Aggregate pipeline events with same desired status.
  
          e.g.
          {
              (FeatureProcessorPipelineExecutionStatus.FAILED,
              FeatureProcessorPipelineExecutionStatus.STOPPED):
                  ["pipeline_name_1", "pipeline_name_2"],
              (FeatureProcessorPipelineExecutionStatus.STOPPED,
              FeatureProcessorPipelineExecutionStatus.STOPPED):
                  ["pipeline_name_3"],
          }
      Args:
          pipeline_events: List of pipeline events.
      Returns:
          Dict[Tuple, List[str]]: A dictionary of desired status keys and corresponding pipeline
          names.
      """
      events_by_desired_status = {}
  
      for event in pipeline_events:
          sorted_execution_status = sorted(
              event.pipeline_execution_status, key=lambda x: x.value
          )
          desired_status_keys = tuple(sorted_execution_status)
  
          if desired_status_keys not in events_by_desired_status:
              events_by_desired_status[desired_status_keys] = []
          events_by_desired_status[desired_status_keys].append(
              event.pipeline_name
          )
  
      return events_by_desired_status
  
imports: from __future__ import absolute_import
  import json
  import logging
  import re
  from typing import Dict, List, Tuple, Optional, Any
  import attr
  from botocore.exceptions import ClientError
  from botocore.paginate import PageIterator
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor._feature_processor_pipeline_events import FeatureProcessorPipelineEvents
  from sagemaker.feature_store.feature_processor._constants import RESOURCE_NOT_FOUND_EXCEPTION, PIPELINE_ARN_REGEX_PATTERN, BASE_EVENT_PATTERN
  from sagemaker.feature_store.feature_processor._enums import FeatureProcessorPipelineExecutionStatus
  from sagemaker.utils import TagsDict
label_desc: Use image node_id 12 for calling the EventBridgeRuleHelper obj's underlying member method code with example usage: obj._aggregate_pipeline_events_with_same_desired_status(pipeline_events) and returns: events_by_desired_status