code: def test_get_sparse_feature_sizes(
      features: Optional[List[Features]],
      attribute: Text,
      featurizers: List[Text],
      expected_sequence_sizes: List[int],
      expected_sentence_sizes: List[int],
  ):
      message = Message(
          data={TEXT: "This is a test sentence."}, features=features
      )
      feature_sizes = message.get_sparse_feature_sizes(
          attribute, featurizers
      )
  
      assert (
          feature_sizes[FEATURE_TYPE_SEQUENCE]
          == expected_sequence_sizes
      )
      assert (
          feature_sizes[FEATURE_TYPE_SENTENCE]
          == expected_sentence_sizes
      )
  
file_path: rasa/tests/shared/nlu/training_data/test_message.py
imports: from typing import Optional, Text, List
  import pytest
  import numpy
  import scipy.sparse
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.constants import TEXT, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE, ACTION_TEXT, ACTION_NAME, INTENT, RESPONSE
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_sparse_feature_sizes(features, attribute, featurizers, expected_sequence_sizes, expected_sentence_sizes) without return types