code: def _prepare_inference_func(
      self, model_name: str, batch_size: int, sequence_length: int
  ):
      _inference = super(
          CustomizedPyTorchBenchmark, self
      )._prepare_inference_func(model_name, batch_size, sequence_length)
  
      def infer_fn():
          _inference()
          torch.cuda.synchronize()
  
      return infer_fn
  
file_path: gluon-nlp/docs/model_zoo/benchmarks/benchmark_hf.py
imports: import argparse
  import pandas
  import math
  import os
  import multiprocessing
  from multiprocessing import Process
  import torch
  from typing import Callable
  from transformers import HfArgumentParser
  from transformers.benchmark.benchmark import PyTorchBenchmark, PyTorchBenchmarkArguments
  import logging
  import timeit
label_desc: Use image node_id 2 for calling the CustomizedPyTorchBenchmark obj's underlying member method code with example usage: obj._prepare_inference_func(model_name, batch_size, sequence_length) and returns: infer_fn