code: def test_removing_label_sparse_feature_sizes(
      initial_sparse_feature_sizes: Dict[Text, Dict[Text, List[int]]],
      final_sparse_feature_sizes: Dict[Text, Dict[Text, List[int]]],
      label_attribute: Text,
  ):
      """Tests if label attribute is removed from sparse feature sizes collection."""
      feature_sizes = DIETClassifier._remove_label_sparse_feature_sizes(
          sparse_feature_sizes=initial_sparse_feature_sizes,
          label_attribute=label_attribute,
      )
      assert feature_sizes == final_sparse_feature_sizes
  
imports: import copy
  from pathlib import Path
  import numpy
  import pytest
  from typing import Callable, List, Optional, Text, Dict, Any, Tuple
  import rasa.utils.common
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.exceptions import InvalidConfigException
  from rasa.shared.importers.rasa import RasaFileImporter
  from rasa.shared.nlu.training_data.features import Features
  from rasa.nlu.constants import BILOU_ENTITIES
  from rasa.nlu.classifiers import LABEL_RANKING_LENGTH
  from rasa.shared.nlu.constants import TEXT, INTENT, ENTITIES, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE, PREDICTED_CONFIDENCE_KEY, INTENT_NAME_KEY
  from rasa.utils import train_utils
  from rasa.utils.tensorflow.constants import LOSS_TYPE, RANDOM_SEED, RANKING_LENGTH, EPOCHS, MASKED_LM, RENORMALIZE_CONFIDENCES, TENSORBOARD_LOG_LEVEL, TENSORBOARD_LOG_DIR, EVAL_NUM_EPOCHS, EVAL_NUM_EXAMPLES, CONSTRAIN_SIMILARITIES, CHECKPOINT_MODEL, BILOU_FLAG, ENTITY_RECOGNITION, INTENT_CLASSIFICATION, MODEL_CONFIDENCE, HIDDEN_LAYERS_SIZES, RUN_EAGERLY
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.nlu.classifiers.diet_classifier import DIETClassifier
  from rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer import CountVectorsFeaturizer
  from rasa.nlu.featurizers.sparse_featurizer.lexical_syntactic_featurizer import LexicalSyntacticFeaturizer
  from rasa.nlu.featurizers.sparse_featurizer.regex_featurizer import RegexFeaturizer
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.constants import DIAGNOSTIC_DATA
  from rasa.shared.nlu.training_data.loading import load_data
  from rasa.utils.tensorflow.model_data_utils import FeatureArray
label_desc: Use image node_id 8 for calling a global function with example usage: test_removing_label_sparse_feature_sizes(initial_sparse_feature_sizes, final_sparse_feature_sizes, label_attribute) without return types