code: def test_prediction_states_ignores_action_intent_unlikely_max_history_featurizer(
      moodbot_tracker: DialogueStateTracker,
      moodbot_domain: Domain,
      max_history: Optional[int],
  ):
      state_featurizer = SingleStateFeaturizer()
      tracker_featurizer = MaxHistoryTrackerFeaturizer(
          state_featurizer, max_history=max_history
      )
  
      tracker = DialogueStateTracker.from_events(
          "default",
          [
              ActionExecuted(ACTION_LISTEN_NAME),
              user_uttered("greet"),
              ActionExecuted(ACTION_UNLIKELY_INTENT_NAME),
              ActionExecuted("utter_greet"),
              ActionExecuted(ACTION_LISTEN_NAME),
              user_uttered("mood_great"),
              ActionExecuted(ACTION_UNLIKELY_INTENT_NAME),
              ActionExecuted("utter_happy"),
              ActionExecuted(ACTION_LISTEN_NAME),
              user_uttered("goodbye"),
          ],
          domain=moodbot_domain,
      )
  
      actual_states = tracker_featurizer.prediction_states(
          [tracker], moodbot_domain, ignore_action_unlikely_intent=True
      )
  
      expected_states = [
          [
              {},
              {
                  PREVIOUS_ACTION: {ACTION_NAME: ACTION_LISTEN_NAME},
                  USER: {INTENT: "greet"},
              },
              {
                  USER: {INTENT: "greet"},
                  PREVIOUS_ACTION: {ACTION_NAME: "utter_greet"},
              },
              {
                  PREVIOUS_ACTION: {ACTION_NAME: ACTION_LISTEN_NAME},
                  USER: {INTENT: "mood_great"},
              },
              {
                  USER: {INTENT: "mood_great"},
                  PREVIOUS_ACTION: {ACTION_NAME: "utter_happy"},
              },
              {
                  PREVIOUS_ACTION: {ACTION_NAME: ACTION_LISTEN_NAME},
                  USER: {INTENT: "goodbye"},
              },
          ]
      ]
  
      if max_history is not None:
          expected_states = [x[-max_history:] for x in expected_states]
  
      assert actual_states is not None
      assert len(actual_states) == len(expected_states)
  
      for actual, expected in zip(actual_states, expected_states):
          assert actual == expected
  
imports: from typing import Text, Dict, List, Optional
  import numpy
  import pytest
  from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer
  from rasa.core.featurizers.single_state_featurizer import IntentTokenizerSingleStateFeaturizer
  from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer
  from rasa.core.featurizers.tracker_featurizers import MaxHistoryTrackerFeaturizer
  from rasa.core.featurizers.tracker_featurizers import IntentMaxHistoryTrackerFeaturizer
  from rasa.core.featurizers.tracker_featurizers import FullDialogueTrackerFeaturizer
  from rasa.shared.core.domain import Domain
  from tests.core.utilities import user_uttered
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.constants import INTENT, ACTION_NAME
  from rasa.shared.core.constants import ACTION_LISTEN_NAME, ACTION_UNLIKELY_INTENT_NAME, USER, PREVIOUS_ACTION
  from rasa.shared.core.events import ActionExecuted
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.utils.tensorflow.constants import LABEL_PAD_ID
  from rasa.utils.tensorflow.model_data import ragged_array_to_ndarray
  from rasa.core.exceptions import InvalidTrackerFeaturizerUsageError
label_desc: Use image node_id 26 for calling a global function with example usage: test_prediction_states_ignores_action_intent_unlikely_max_history_featurizer(moodbot_tracker, moodbot_domain, max_history) without return types