code: def compare_featurized_states(
      states1: List[Dict[Text, List[Features]]],
      states2: List[Dict[Text, List[Features]]],
  ) -> bool:
      """Compares two lists of featurized states and returns True if they
      are identical and False otherwise.
      """
  
      if len(states1) != len(states2):
          return False
  
      for state1, state2 in zip(states1, states2):
          if state1.keys() != state2.keys():
              return False
          for key in state1.keys():
              for feature1, feature2 in zip(state1[key], state2[key]):
                  if np.any(
                      (feature1.features != feature2.features).toarray()
                  ):
                      return False
                  if feature1.origin != feature2.origin:
                      return False
                  if feature1.attribute != feature2.attribute:
                      return False
                  if feature1.type != feature2.type:
                      return False
      return True
  
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 6 for calling a global function with example usage: compare_featurized_states(states1, states2) and returns: True, False, False, False, False, False, False