code: def warmup(
      ls_tokenizer,
      hf_tokenizer,
      ls_model,
      hf_model,
      sentences,
      generation_method,
  ):
      # ls_inputs = ls_tokenizer(sentences, return_tensors="pt", padding=True)["input_ids"]
      hf_inputs = hf_tokenizer(
          sentences, return_tensors="pt", padding=True
      )["input_ids"]
  
      if generation_method == "topk" or generation_method == "topp":
          # ls_generate(ls_model, ls_tokenizer, ls_inputs)
          hf_generate(hf_model, hf_tokenizer, hf_inputs)
      elif generation_method == "ppl":
          # ls_ppl(ls_model, ls_tokenizer, ls_inputs)
          hf_ppl(hf_model, hf_tokenizer, hf_inputs)
  
file_path: lightseq/examples/inference/python/test/ls_gpt2_bench.py
imports: import time
  import argparse
  import torch
  import lightseq.inference
  from transformers import GPT2Tokenizer, GPT2LMHeadModel
label_desc: Use image node_id 8 for calling a global function with example usage: warmup(ls_tokenizer, hf_tokenizer, ls_model, hf_model, sentences, generation_method) without return types