code: def test_condition(
      condition_marker_type: Type[ConditionMarker], negated: bool
  ):
      """Each marker applies an exact number of times (slots are immediately un-set)."""
      marker = condition_marker_type(
          text="same-text", name="marker_name", negated=negated
      )
      events = [
          UserUttered(intent={"name": "1"}),
          UserUttered(intent={"name": "same-text"}),
          SlotSet("same-text", value="any"),
          SlotSet("same-text", value=None),
          ActionExecuted(action_name="same-text"),
      ]
      num_non_negated_condition_applies = 3
      events = events * num_non_negated_condition_applies
      for event in events:
          marker.track(event)
      assert len(marker.history) == len(events)
      expected = (
          num_non_negated_condition_applies
          if not negated
          else (len(events) - num_non_negated_condition_applies)
      )
      assert sum(marker.history) == expected
  
imports: import csv
  from typing import List, Optional, Set, Text, Tuple, Type, Any
  import itertools
  from pathlib import Path
  import pytest
  import numpy
  import rasa.shared.utils.io
  from rasa.core.evaluation.marker import IntentDetectedMarker, SlotSetMarker, OccurrenceMarker, ActionExecutedMarker, AndMarker, OrMarker, NotMarker, SequenceMarker
  from rasa.core.evaluation.marker_base import OperatorMarker, Marker, ConditionMarker, InvalidMarkerConfig
  from rasa.shared.core.constants import ACTION_SESSION_START_NAME
  from rasa.shared.core.events import SlotSet, ActionExecuted, UserUttered, SessionStarted
  from rasa.shared.nlu.constants import INTENT_NAME_KEY
  from rasa.shared.core.slots import TextSlot
  from rasa.core.evaluation.marker_tracker_loader import MarkerTrackerLoader
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.core.tracker_store import InMemoryTrackerStore
  from rasa.shared.core.domain import Domain
label_desc: Use image node_id 3 for calling a global function with example usage: test_condition(condition_marker_type, negated) without return types