code: def test_get_backbone(name, ctx):
      with tempfile.TemporaryDirectory() as root, ctx:
          # Test for model download
          (
              model_cls,
              cfg,
              tokenizer,
              local_params_path,
              _,
          ) = get_backbone(name, root=root)
          net = model_cls.from_cfg(cfg)
          net.load_parameters(local_params_path)
          net.hybridize()
          num_params, num_fixed_params = count_parameters(
              net.collect_params()
          )
          assert num_params > 0
  
          # Test for model export + save
          if "gpt2" in name:
              pytest.skip("Skipping GPT-2 test")
          elif name in [
              "google_t5_3B",
              "google_t5_11B",
              "google_mt5_xl",
              "google_mt5_xxl",
          ]:
              pytest.skip("Skipping large T5 (mT5) model test")
          batch_size = 1
          sequence_length = 4
          inputs = mx.np.random.randint(
              0, 10, (batch_size, sequence_length)
          )
          token_types = mx.np.random.randint(
              0, 2, (batch_size, sequence_length)
          )
          valid_length = mx.np.random.randint(
              1, sequence_length, (batch_size,)
          )
          if "roberta" in name:
              out = net(inputs, valid_length)
          elif "xlmr" in name:
              out = net(inputs, valid_length)
          elif "bart" in name:
              out = net(inputs, valid_length, inputs, valid_length)
          elif "gpt2" in name:
              states = net.init_states(batch_size=batch_size, ctx=ctx)
              out, new_states = net(inputs, states)
              out_np = out.asnumpy()
          elif "t5" in name:
              out = net(inputs, valid_length, inputs, valid_length)
          else:
              out = net(inputs, token_types, valid_length)
          mx.npx.waitall()
          net.export(os.path.join(root, "model"))
  
file_path: gluon-nlp/tests/test_models.py
imports: import tempfile
  import pytest
  import mxnet
  import os
  import numpy
  import numpy.testing
  from gluonnlp.models import get_backbone, list_backbone_names
  from gluonnlp.utils.parameter import count_parameters
  from gluonnlp.utils.lazy_imports import try_import_tvm
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_backbone(name, ctx) without return types