code: def find_story_conflicts(
      trackers: List[TrackerWithCachedStates],
      domain: Domain,
      max_history: Optional[int] = None,
  ) -> List[StoryConflict]:
      """Generates `StoryConflict` objects, describing conflicts in the given trackers.
  
      Args:
          trackers: Trackers in which to search for conflicts.
          domain: The domain.
          max_history: The maximum history length to be taken into account.
  
      Returns:
          StoryConflict objects.
      """
      if max_history:
          logger.info(
              f"Considering the preceding {max_history} turns for conflict analysis."
          )
      else:
          logger.info(
              "Considering all preceding turns for conflict analysis."
          )
  
      # We do this in two steps, to reduce memory consumption:
  
      # Create a 'state -> list of actions' dict, where the state is
      # represented by its hash
      conflicting_state_action_mapping = _find_conflicting_states(
          trackers, domain, max_history
      )
  
      # Iterate once more over all states and note the (unhashed) state,
      # for which a conflict occurs
      conflicts = _build_conflicts_from_states(
          trackers,
          domain,
          max_history,
          conflicting_state_action_mapping,
      )
  
      return conflicts
  
imports: from collections import defaultdict
  import logging
  import json
  from typing import DefaultDict, Dict, Generator, List, NamedTuple, Optional, Text, Tuple
  from rasa.core.featurizers.tracker_featurizers import MaxHistoryTrackerFeaturizer
  from rasa.shared.core.constants import ACTION_LISTEN_NAME, PREVIOUS_ACTION, ACTION_UNLIKELY_INTENT_NAME, USER
  from rasa.shared.core.domain import Domain, State
  from rasa.shared.core.events import ActionExecuted, Event
  from rasa.shared.core.generator import TrackerWithCachedStates
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  from rasa.shared.nlu.constants import TEXT
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 1 for calling a global function with example usage: find_story_conflicts(trackers, domain, max_history) and returns: conflicts