code: def test_corner_case_max_fpr(max_fpr):
      """Check that metric returns 0 when one class is missing and `max_fpr` is set."""
      preds = torch.tensor([0.1, 0.2, 0.3, 0.4])
      target = torch.tensor([0, 0, 0, 0])
      metric = BinaryAUROC(max_fpr=max_fpr)
      assert metric(preds, target) == 0.0
  
      preds = torch.tensor([0.5, 0.6, 0.7, 0.8])
      target = torch.tensor([1, 1, 1, 1])
      metric = BinaryAUROC(max_fpr=max_fpr)
      assert metric(preds, target) == 0.0
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from scipy.special import softmax
  from sklearn.metrics import roc_auc_score
  from torchmetrics.classification.auroc import AUROC, BinaryAUROC, MulticlassAUROC, MultilabelAUROC
  from torchmetrics.functional.classification.auroc import binary_auroc, multiclass_auroc, multilabel_auroc
  from torchmetrics.functional.classification.roc import binary_roc
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 5 for calling a global function with example usage: test_corner_case_max_fpr(max_fpr) without return types