code: def test_huggingfacelmrescorer(device):
      from speechbrain.decoders.scorer import (
          HuggingFaceLMRescorer,
          RescorerBuilder,
      )
  
      source = "gpt2-medium"
  
      huggingfacelm_rescorer = HuggingFaceLMRescorer(
          model_name=source,
      )
  
      rescorer = RescorerBuilder(
          rescorers=[huggingfacelm_rescorer],
          weights={"huggingfacelm": 1.0},
      )
  
      # Topk hypotheses
      topk_hyps = [["HELLO", "HE LLO", "H E L L O"]]
      topk_scores = [[-2, -2, -2]]
      rescored_hyps, rescored_scores = rescorer.rescore(
          topk_hyps, topk_scores
      )
  
      # check all hyps are still there
      for hyp in topk_hyps[0]:
          assert hyp in rescored_hyps[0]
  
      # check rescored_scores are sorted
      for i in range(len(rescored_scores[0]) - 1):
          assert rescored_scores[0][i] >= rescored_scores[0][i + 1]
  
      # check normalized_text is working
      text = "hello"
      normalized_text = huggingfacelm_rescorer.normalize_text(text)
      assert normalized_text == text
  
      # check lm is on the right device
      huggingfacelm_rescorer.to_device(device)
      assert huggingfacelm_rescorer.lm.device.type == device
  
      # check preprocess_func
      padded_hyps = huggingfacelm_rescorer.preprocess_func(topk_hyps)
      assert padded_hyps.input_ids.shape[0] == 3
  
label_desc: Use image node_id 3 for calling a global function with example usage: test_huggingfacelmrescorer(device) without return types