code: def from_scores(cls, true_dupes: set, found_dupes: set):
      true_positives = found_dupes.intersection(true_dupes)
  
      n_true = len(true_dupes)
      n_found = len(found_dupes)
      precision = len(true_positives) / n_found
      recall = len(true_positives) / n_true
  
      return cls(n_true, n_found, precision, recall)
  
file_path: dedupe/benchmarks/benchmarks/common.py
imports: import csv
  import logging
  import optparse
  import re
  from dataclasses import dataclass
  from itertools import groupby
  from pathlib import Path
label_desc: Use image node_id 1 for calling the Report obj's underlying member method code with example usage: obj.from_scores(cls, true_dupes, found_dupes) and returns: cls