code: def test_forward_runs_with_bijective_and_non_bijective_mapping(self):
      params = Params(
          {
              "token_embedders": {
                  "bert": {
                      "type": "pretrained_transformer",
                      "model_name": "bert-base-uncased",
                  },
                  "token_characters": {
                      "type": "character_encoding",
                      "embedding": {"embedding_dim": 5},
                      "encoder": {
                          "type": "cnn",
                          "embedding_dim": 5,
                          "num_filters": 5,
                          "ngram_filter_sizes": [5],
                      },
                  },
              }
          }
      )
      token_embedder = BasicTextFieldEmbedder.from_params(
          vocab=self.vocab, params=params
      )
      inputs = {
          "bert": {
              "token_ids": (torch.rand(3, 5) * 10).long(),
              "mask": (torch.rand(3, 5) * 1).bool(),
          },
          "token_characters": {
              "token_characters": (torch.rand(3, 5, 5) * 1).long()
          },
      }
      token_embedder(inputs)
  
file_path: allennlp/tests/modules/text_field_embedders/basic_text_field_embedder_test.py
imports: import pytest
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.data import Vocabulary
  from allennlp.modules.text_field_embedders import BasicTextFieldEmbedder
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 10 for calling the TestBasicTextFieldEmbedder obj's underlying member method code with example usage: obj.test_forward_runs_with_bijective_and_non_bijective_mapping() without return types