code: def test_pick_thresholds_for_labels(
      self, tolerance: float, expected_thresholds: List[float]
  ):
      label_id_tolerance_thresholds = {
          0: [
              0.2,
              0.2,
              0.2,
              0.2,
              0.2,
              0.2,
              -0.1,
              -0.1,
              -0.5,
              -0.5,
              -1.2,
              -1.2,
              -2.3,
              -2.3,
              -2.7,
              -2.9,
              -3.2,
              -3.2,
              -4.1,
              -4.1,
          ],
          3: [
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
              -0.1,
          ],
          4: [0.2 - (index * 0.3) for index in range(20)],
      }
      thresholds = UnexpecTEDIntentPolicy._pick_thresholds(
          label_id_tolerance_thresholds, tolerance
      )
      assert sorted(list(thresholds.keys())) == sorted(
          list(label_id_tolerance_thresholds.keys())
      )
      computed_values = list(thresholds.values())
      assert expected_thresholds == computed_values
  
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 12 for calling the TestUnexpecTEDIntentPolicy obj's underlying member method code with example usage: obj.test_pick_thresholds_for_labels(tolerance, expected_thresholds) without return types