code: def scoreGazette(
      record_pairs: Blocks,
      featurizer: FeaturizerFunction,
      classifier: Classifier,
      num_cores: int = 1,
  ) -> Generator[Scores, None, None]:
      first, record_pairs = peek(record_pairs)
      if first is None:
          return  # terminate iteration
  
      imap, pool = appropriate_imap(num_cores)
  
      score_records = ScoreGazette(featurizer, classifier)
  
      for scored_pairs in imap(score_records, record_pairs):
          yield scored_pairs
  
      # The underlying processes in the pool should terminate when the
      # pool is garbage collected, but sometimes it takes a while
      # before GC, so do it explicitly here
      pool.close()
      pool.join()
  
imports: from __future__ import annotations
  import collections
  import functools
  import itertools
  import multiprocessing
  import multiprocessing.dummy
  import os
  import queue
  import tempfile
  from typing import TYPE_CHECKING, overload
  import numpy
  from dedupe.backport import RLock
label_desc: Use image node_id 3 for calling a global function with example usage: scoreGazette(record_pairs, featurizer, classifier, num_cores) without return types