code: def greedyMatching(dupes: Scores) -> TupleLinks:
      A: set[RecordID] = set()
      B: set[RecordID] = set()
  
      dupes.sort(order="score")
      dupes = dupes[::-1]
  
      for (a, b), score in dupes:
          if a not in A and b not in B:
              A.add(a)
              B.add(b)
  
              yield (a, b), score
  
imports: from __future__ import annotations
  import array
  import itertools
  import logging
  import tempfile
  from collections import defaultdict
  from typing import Generator, Iterable, Sequence, cast
  import numpy
  import numpy.typing
  import scipy.cluster.hierarchy
  from dedupe._typing import ArrayLinks, Clusters, RecordID, Scores, TupleLinks
label_desc: Use image node_id 7 for calling a global function with example usage: greedyMatching(dupes) without return types