code: def test_input_padding(
      token_ids: List[List[int]],
      max_sequence_length_model: int,
      resulting_length: int,
      padding_added: 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": "bert"}
      )
      component.pad_token_id = 0
      padded_input = component._add_padding_to_batch(
          token_ids, max_sequence_length_model
      )
      assert len(padded_input[0]) == resulting_length
      if padding_added:
          original_length = len(token_ids[0])
          assert np.all(
              np.array(padded_input[0][original_length:]) == 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 9 for calling a global function with example usage: test_input_padding(token_ids, max_sequence_length_model, resulting_length, padding_added, create_language_model_featurizer, monkeypatch) without return types