code: def test_loading_partial_pretrained_weights():
      # The pretrained module has 12 bert layers, while the instance will have only 3.
      TransformerStack.from_pretrained_module(
          "bert-base-cased", num_hidden_layers=3, strict=False
      )
  
file_path: allennlp/tests/modules/transformer/transformer_stack_test.py
imports: import copy
  import torch
  import pytest
  from allennlp.common import Params
  from allennlp.common import cached_transformers
  from allennlp.modules.transformer import TransformerStack, TransformerLayer
label_desc: Use image node_id 5 for calling a global function with example usage: test_loading_partial_pretrained_weights() without return types