code: def test_label_data_assembly(
      self,
      trained_policy: UnexpecTEDIntentPolicy,
      default_domain: Domain,
  ):
      # Construct input data
      state_featurizer = trained_policy.featurizer.state_featurizer
      encoded_all_labels = state_featurizer.encode_all_labels(
          default_domain, precomputations=None
      )
      attribute_data, _ = model_data_utils.convert_to_data_format(
          encoded_all_labels
      )
  
      assembled_label_data = trained_policy._assemble_label_data(
          attribute_data, default_domain
      )
      assembled_label_data_signature = (
          assembled_label_data.get_signature()
      )
  
      assert list(assembled_label_data_signature.keys()) == [
          f"{LABEL}_{INTENT}",
          LABEL,
      ]
      assert assembled_label_data.num_examples == len(
          default_domain.intents
      )
      assert list(
          assembled_label_data_signature[f"{LABEL}_{INTENT}"].keys()
      ) == [
          MASK,
          SENTENCE,
      ]
      assert list(assembled_label_data_signature[LABEL].keys()) == [IDS]
      assert assembled_label_data_signature[f"{LABEL}_{INTENT}"][
          SENTENCE
      ][0].units == len(default_domain.intents)
  
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 6 for calling the TestUnexpecTEDIntentPolicy obj's underlying member method code with example usage: obj.test_label_data_assembly(trained_policy, default_domain) without return types