code: def test_long_sequences_extra_padding(
      sequence_embeddings: np.ndarray,
      actual_sequence_lengths: List[int],
      model_name: Text,
      padding_needed: bool,
      create_language_model_featurizer: Callable[
          [Dict[Text, Any]], LanguageModelFeaturizer
      ],
      monkeypatch: MonkeyPatch,
  ):
      monkeypatch.setattr(
          LanguageModelFeaturizer,
          "_load_model_instance",
          lambda _: None,
      )
      component = create_language_model_featurizer(
          {"model_name": model_name}
      )
      modified_sequence_embeddings = component._add_extra_padding(
          sequence_embeddings, actual_sequence_lengths
      )
      if not padding_needed:
          assert np.all(modified_sequence_embeddings) == np.all(
              sequence_embeddings
          )
      else:
          assert (
              modified_sequence_embeddings.shape[1]
              == actual_sequence_lengths[0]
          )
          assert (
              modified_sequence_embeddings[0].shape[-1]
              == sequence_embeddings[0].shape[-1]
          )
          zero_embeddings = modified_sequence_embeddings[0][
              sequence_embeddings.shape[1] :
          ]
          assert np.all(zero_embeddings == 0)
  
imports: import os
  from typing import Text, List, Dict, Tuple, Any, Callable
  import numpy
  import pytest
  import logging
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.logging import LogCaptureFixture
  from rasa.engine.graph import ExecutionContext
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.nlu.constants import TOKENS_NAMES, NUMBER_OF_SUB_TOKENS
  from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.featurizers.dense_featurizer.lm_featurizer import LanguageModelFeaturizer
  from rasa.shared.nlu.constants import TEXT, INTENT
  from rasa.nlu.tokenizers.tokenizer import Token
label_desc: Use image node_id 8 for calling a global function with example usage: test_long_sequences_extra_padding(sequence_embeddings, actual_sequence_lengths, model_name, padding_needed, create_language_model_featurizer, monkeypatch) without return types