class_docstr: Handles incoming messages with low NLU confidence.
class_docstr_tok: ["Handles","incoming","messages","with","low","NLU","confidence","."]
docstr: Check if the fallback intent should be predicted.
  
  Args:
      message: The current message and its intent predictions.
  
  Returns:
      `True` if the fallback intent should be predicted.
docstr_tok: ["Check","if","the","fallback","intent","should","be","predicted",".","Args",":","message",":","The","current","message","and","its","intent","predictions",".","Returns",":","`","True","`","if","the","fallback","intent","should","be","predicted","."]
code: def _should_fallback(self, message: Message) -> bool:
      """Check if the fallback intent should be predicted.
  
      Args:
          message: The current message and its intent predictions.
  
      Returns:
          `True` if the fallback intent should be predicted.
      """
      intent_name = message.data[INTENT].get(INTENT_NAME_KEY)
      (
          below_threshold,
          nlu_confidence,
      ) = self._nlu_confidence_below_threshold(message)
  
      if below_threshold:
          logger.debug(
              f"NLU confidence {nlu_confidence} for intent '{intent_name}' is lower "
              f"than NLU threshold {self.component_config[THRESHOLD_KEY]:.2f}."
          )
          return True
  
      (
          ambiguous_prediction,
          confidence_delta,
      ) = self._nlu_prediction_ambiguous(message)
      if ambiguous_prediction:
          logger.debug(
              f"The difference in NLU confidences "
              f"for the top two intents ({confidence_delta}) is lower than "
              f"the ambiguity threshold "
              f"{self.component_config[AMBIGUITY_THRESHOLD_KEY]:.2f}. Predicting "
              f"intent '{DEFAULT_NLU_FALLBACK_INTENT_NAME}' instead of "
              f"'{intent_name}'."
          )
          return True
  
      return False
  
imports: from __future__ import annotations
  import copy
  import logging
  from typing import Any, List, Text, Dict, Type, Union, Tuple, Optional
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.constants import DEFAULT_NLU_FALLBACK_INTENT_NAME
  from rasa.core.constants import DEFAULT_NLU_FALLBACK_THRESHOLD, DEFAULT_NLU_FALLBACK_AMBIGUITY_THRESHOLD
  from rasa.nlu.classifiers.classifier import IntentClassifier
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import INTENT, INTENT_NAME_KEY, INTENT_RANKING_KEY, PREDICTED_CONFIDENCE_KEY
label_desc: Use image node_id 6 for calling the FallbackClassifier obj's underlying member method code with example usage: obj._should_fallback(message) and returns: False, True, True