code: def test_characterization_score():
      out = characterization_score(
          pos_fidelity=torch.tensor([1.0, 0.6, 0.5, 1.0]),
          neg_fidelity=torch.tensor([0.0, 0.2, 0.5, 1.0]),
          pos_weight=0.2,
          neg_weight=0.8,
      )
      assert out.tolist() == [1.0, 0.75, 0.5, 0.0]
  
file_path: pytorch_geometric/test/explain/metric/test_fidelity.py
imports: import pytest
  import torch
  from torch_geometric.explain import DummyExplainer, Explainer, characterization_score, fidelity, fidelity_curve_auc
label_desc: Use image node_id 2 for calling a global function with example usage: test_characterization_score() without return types