code: def pytest_generate_tests(metafunc):
      labels = [
          torch.tensor(
              [
                  [
                      [0, 0, 0, 1, 0, 0, 0],
                  ]
                  * 400,
              ]
          ),
          torch.tensor(
              [
                  [
                      [0, 1, 0, 1, 0, 1, 0],
                  ]
                  * 400,
              ]
          ),
      ]
      preds = torch.arange(2800) / 2800.0
      preds = preds.view(1, 1, 400, 7)
  
      preds = [preds, preds]
  
      fpr_limit = [1 / 3, 1 / 3]
      expected_aupro = [torch.tensor(1 / 6), torch.tensor(1 / 6)]
  
      # Also test that per-region aupros are averaged
      labels.append(torch.cat(labels))
      preds.append(torch.cat(preds))
      fpr_limit.append(float(np.mean(fpr_limit)))
      expected_aupro.append(torch.tensor(np.mean(expected_aupro)))
  
      threshold_count = [
          200,
          200,
          200,
      ]
  
      if metafunc.function is test_aupro:
          vals = list(zip(labels, preds, fpr_limit, expected_aupro))
          metafunc.parametrize(
              argnames=(
                  "labels",
                  "preds",
                  "fpr_limit",
                  "expected_aupro",
              ),
              argvalues=vals,
          )
      elif metafunc.function is test_binned_aupro:
          vals = list(zip(labels, preds, threshold_count))
          metafunc.parametrize(
              argnames=("labels", "preds", "threshold_count"),
              argvalues=vals,
          )
  
imports: import numpy
  import torch
  from anomalib.utils.metrics import AUPRO
  from tests.helpers.aupro_reference import calculate_au_pro
label_desc: Use image node_id 1 for calling a global function with example usage: pytest_generate_tests(metafunc) without return types