docstr: Skips predictions if there's a new intent created.
code: def test_skip_predictions_if_new_intent(
      self,
      trained_policy: UnexpecTEDIntentPolicy,
      model_storage: ModelStorage,
      resource: Resource,
      execution_context: ExecutionContext,
      default_domain: Domain,
      caplog: LogCaptureFixture,
      tracker_events: List[Event],
  ):
      """Skips predictions if there's a new intent created."""
      tracker = DialogueStateTracker(
          sender_id="init", slots=default_domain.slots
      )
      tracker.update_with_events(tracker_events, default_domain)
  
      with caplog.at_level(logging.DEBUG):
          prediction = trained_policy.predict_action_probabilities(
              tracker, default_domain, precomputations=None
          )
  
      assert (
          "Skipping predictions for UnexpecTEDIntentPolicy"
          in caplog.text
      )
  
      assert (
          prediction.probabilities
          == trained_policy._default_predictions(default_domain)
      )
  
imports: import json
  from pathlib import Path
  from typing import Optional, List, Dict, Type
  import tensorflow
  import numpy
  import pytest
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.logging import LogCaptureFixture
  import logging
  from rasa.core.featurizers.single_state_featurizer import IntentTokenizerSingleStateFeaturizer
  from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer
  from rasa.core.featurizers.tracker_featurizers import IntentMaxHistoryTrackerFeaturizer
  from rasa.nlu.classifiers import LABEL_RANKING_LENGTH
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.core.generator import TrackerWithCachedStates
  from rasa.core.policies.ted_policy import PREDICTION_FEATURES
  from rasa.core.policies.unexpected_intent_policy import UnexpecTEDIntentPolicy, RankingCandidateMetadata
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.core.constants import ACTION_UNLIKELY_INTENT_NAME, ACTION_LISTEN_NAME
  from rasa.shared.core.domain import Domain
  from rasa.shared.core.events import ActionExecuted, UserUttered, EntitiesAdded, SlotSet, ActionExecutionRejected, ActiveLoop
  from rasa.shared.core.trackers import DialogueStateTracker
  from rasa.utils.tensorflow.constants import IGNORE_INTENTS_LIST, LABEL, MASK, SENTENCE, IDS, POSITIVE_SCORES_KEY, NEGATIVE_SCORES_KEY, RANKING_KEY, RANKING_LENGTH
  from rasa.shared.nlu.constants import INTENT
  from rasa.shared.core.events import Event
  from rasa.utils.tensorflow import model_data_utils
  from tests.core.test_policies import train_trackers
  from tests.core.policies.test_ted_policy import TestTEDPolicy
label_desc: Use image node_id 18 for calling the TestUnexpecTEDIntentPolicy obj's underlying member method code with example usage: obj.test_skip_predictions_if_new_intent(trained_policy, model_storage, resource, execution_context, default_domain, caplog, tracker_events) without return types