code: def test_minDCF(device):
      from speechbrain.utils.metric_stats import minDCF
  
      positive_scores = torch.tensor([0.1, 0.2, 0.3], device=device)
      negative_scores = torch.tensor([0.4, 0.5, 0.6], device=device)
      min_dcf, threshold = minDCF(positive_scores, negative_scores)
      assert (0.01 - min_dcf) < 1e-4
      assert threshold >= 0.6
  
      positive_scores = torch.tensor([0.4, 0.5, 0.6], device=device)
      negative_scores = torch.tensor([0.1, 0.2, 0.3], device=device)
      min_dcf, threshold = minDCF(positive_scores, negative_scores)
      assert min_dcf == 0
      assert threshold > 0.3 and threshold < 0.4
  
file_path: speechbrain/tests/unittests/test_metrics.py
imports: import torch
  import torch.nn
  import math
label_desc: Use image node_id 5 for calling a global function with example usage: test_minDCF(device) without return types