code: def test_train_model_gpu(pretrain_file, tmp_path):
      """
      Briefly train an NER model (no expectation of correctness) and check that it is on the GPU
      """
      trainer = run_training(pretrain_file, tmp_path)
      if not torch.cuda.is_available():
          warnings.warn(
              "Cannot check that the NER model is on the GPU, since GPU is not available"
          )
          return
  
      model = trainer.model
      device = next(model.parameters()).device
      assert str(device).startswith("cuda")
  
imports: import json
  import logging
  import os
  import warnings
  import pytest
  import torch
  from stanza.models import ner_tagger
  from stanza.models.ner.trainer import Trainer
  from stanza.tests import TEST_WORKING_DIR
  from stanza.utils.datasets.ner.prepare_ner_file import process_dataset
label_desc: Use image node_id 11 for calling a global function with example usage: test_train_model_gpu(pretrain_file, tmp_path) without return types