code: def test_generated_trackers_can_omit_unset_slots(
      default_model_storage: ModelStorage,
      default_execution_context: ExecutionContext,
  ):
      reader = YAMLStoryReader()
      steps = reader.read_from_file(
          "data/test_yaml_stories/rules_greet_and_goodbye.yml"
      )
  
      domain = Domain.from_path(
          "data/test_domains/initial_slot_values_greet_and_goodbye.yml"
      )
  
      component = TrainingTrackerProvider.create(
          TrainingTrackerProvider.get_default_config(),
          default_model_storage,
          Resource("xy"),
          default_execution_context,
      )
  
      trackers = component.provide(
          story_graph=StoryGraph(steps), domain=domain
      )
  
      assert len(trackers) == 2
      assert all([t.is_rule_tracker for t in trackers])
  
      states_without_unset_slots = trackers[0].past_states(
          domain, omit_unset_slots=True
      )
      assert not any(
          ["slots" in state for state in states_without_unset_slots]
      )
  
      states_with_unset_slots = trackers[0].past_states(
          domain, omit_unset_slots=False
      )
      assert all(
          ["slots" in state for state in states_with_unset_slots]
      )
  
file_path: rasa/tests/graph_components/providers/test_training_tracker_provider.py
imports: from typing import Dict, Text, Any
  import pytest
  from rasa.graph_components.providers.training_tracker_provider import TrainingTrackerProvider
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.generator import TrackerWithCachedStates
  from rasa.shared.core.training_data.story_reader.yaml_story_reader import YAMLStoryReader
  from rasa.shared.core.training_data.structures import StoryGraph
label_desc: Use image node_id 2 for calling a global function with example usage: test_generated_trackers_can_omit_unset_slots(default_model_storage, default_execution_context) without return types