code: def search(original_cover: Cover, target: int, calls: int) -> Partial:
      def _covered(partial: Partial) -> int:
          return (
              len(
                  frozenset.union(*(original_cover[p] for p in partial))
              )
              if partial
              else 0
          )
  
      cheapest_score = float("inf")
      cheapest: Partial = ()
  
      start: tuple[Cover, Partial] = (original_cover, ())
      to_explore = [start]
  
      while to_explore and calls:
          candidates, partial = to_explore.pop()
  
          covered = _covered(partial)
          score = _score(partial)
  
          if covered < target:
              window = cheapest_score - score
              candidates = {
                  p: cover
                  for p, cover in candidates.items()
                  if p.cover_count < window
              }
  
              reachable = _reachable(candidates) + covered
  
              if candidates and reachable >= target:
                  order_by = functools.partial(_order_by, candidates)
                  best = max(candidates, key=order_by)
  
                  reduced = _remove_dominated(candidates, best)
                  to_explore.append((reduced, partial))
  
                  remaining = _uncovered_by(
                      candidates, candidates[best]
                  )
                  to_explore.append((remaining, partial + (best,)))
  
          elif score < cheapest_score:
              cheapest = partial
              cheapest_score = score
  
          calls -= 1
  
      return cheapest
  
file_path: dedupe/dedupe/branch_and_bound.py
imports: from __future__ import annotations
  import functools
  from typing import Any, Iterable, Mapping, Sequence, Tuple
  from ._typing import Cover
  from .predicates import Predicate
label_desc: Use image node_id 6 for calling a global function with example usage: search(original_cover, target, calls) and returns: cheapest, unknown