code: def test_temporary_tracker():
      extra_slot = "some_slot"
      sender_id = "test"
      domain = Domain.from_yaml(
          f"""
          version: "{LATEST_TRAINING_DATA_FORMAT_VERSION}"
          slots:
            {extra_slot}:
              type: any
              mappings:
              - type: from_text
          """
      )
  
      previous_events = [ActionExecuted(ACTION_LISTEN_NAME)]
      old_tracker = DialogueStateTracker.from_events(
          sender_id, previous_events, slots=domain.slots
      )
      new_events = [Restarted()]
      form_action = FormAction("some name", None)
      temp_tracker = form_action._temporary_tracker(
          old_tracker, new_events, domain
      )
  
      assert extra_slot in temp_tracker.slots.keys()
      assert list(temp_tracker.events) == [
          *previous_events,
          SlotSet(REQUESTED_SLOT),
          ActionExecuted(form_action.name()),
          *new_events,
      ]
  
imports: import logging
  import textwrap
  from typing import Dict, Text, List, Any, Union
  from unittest.mock import Mock
  import pytest
  from _pytest.logging import LogCaptureFixture
  from _pytest.monkeypatch import MonkeyPatch
  from aioresponses import aioresponses
  from rasa.core.agent import Agent
  from rasa.core.policies.policy import PolicyPrediction
  from rasa.core.actions import action
  from rasa.core.actions.action import ActionExecutionRejection, ActionExtractSlots
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION, REQUIRED_SLOTS_KEY, IGNORED_INTENTS
  from rasa.shared.core.constants import ACTION_LISTEN_NAME, REQUESTED_SLOT
  from rasa.core.actions.forms import FormAction
  from rasa.core.channels import CollectingOutputChannel
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import ActiveLoop, SlotSet, UserUttered, ActionExecuted, BotUttered, Restarted, Event, ActionExecutionRejected, DefinePrevUserUtteredFeaturization
  from rasa.core.nlg import TemplatedNaturalLanguageGenerator
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.utils.endpoints import EndpointConfig
label_desc: Use image node_id 2 for calling a global function with example usage: test_temporary_tracker() without return types