code: def test_torch_throughput(
      generate_results_dir, path: str = None, category: str = "shapes"
  ):
      """Test get_torch_throughput from utils/sweep/inference.py"""
      # generate results with torch model exported
      model_config = generate_results_dir(
          model_name="padim",
          dataset_path=path,
          task=TaskType.CLASSIFICATION,
          category=category,
          export_mode=ExportMode.TORCH,
      )
  
      # create Dataset from generated TestDataset
      dataset = FolderDataset(
          task=TaskType.CLASSIFICATION,
          transform=transforms,
          root=path,
          normal_dir=f"{category}/test/good",
      )
      dataset.setup()
  
      # run procedure using torch inferencer
      get_torch_throughput(
          model_config.project.path,
          dataset,
          device=model_config.trainer.accelerator,
      )
  
file_path: anomalib/tests/pre_merge/utils/sweep/test_throughput.py
imports: import albumentations
  from albumentations.pytorch import ToTensorV2
  from anomalib.data import TaskType
  from anomalib.data.folder import FolderDataset
  from anomalib.deploy import ExportMode
  from anomalib.utils.sweep.helpers import get_torch_throughput, get_openvino_throughput
  from tests.helpers.dataset import TestDataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_torch_throughput(generate_results_dir, path, category) without return types