code: def _find_events_after_actions(
      trackers: List["DialogueStateTracker"],
  ) -> DefaultDict[Text, Set["Event"]]:
      """Creates a mapping of action names / texts and events that follow these actions.
  
      Args:
          trackers: the list of trackers
  
      Returns:
          A mapping of action names / texts and events that follow these actions.
      """
      events_after_actions = defaultdict(set)
  
      for tracker in trackers:
          action_name = None
          for event in tracker.events:
              if isinstance(event, ActionExecuted):
                  action_name = event.action_name or event.action_text
                  continue
              if isinstance(event, UserUttered):
                  # UserUttered can contain entities that might set some slots, reset
                  # action_name so that these slots are not attributed to action_listen
                  action_name = None
                  continue
  
              if action_name:
                  events_after_actions[action_name].add(event)
  
      return events_after_actions
  
file_path: rasa/rasa/core/training/training.py
imports: import dataclasses
  from typing import DefaultDict, Dict, List, Optional, Set, Text, TYPE_CHECKING
  from collections import defaultdict
  from rasa.shared.core.events import ActionExecuted, UserUttered
  from rasa.shared.core.events import SlotSet, ActiveLoop
label_desc: Use image node_id 1 for calling a global function with example usage: _find_events_after_actions(trackers) and returns: events_after_actions