code: def randomPairsMatch(
      n_records_A: int, n_records_B: int, sample_size: int
  ) -> IndicesIterator:
      """
      Return random combinations of indices for record list A and B
      """
      n: int = n_records_A * n_records_B
  
      if not sample_size:
          return iter([])
      elif sample_size >= n:
          random_pairs = numpy.arange(n)
      else:
          random_pairs = numpy.array(
              random.sample(range(n), sample_size)
          )
  
      i, j = numpy.unravel_index(
          random_pairs, (n_records_A, n_records_B)
      )
  
      return zip(i, j)
  
imports: from __future__ import annotations
  import collections
  import itertools
  import random
  import sys
  import warnings
  from typing import Iterator, Tuple, overload
  import numpy
  import dedupe
  from dedupe._typing import DataInt, DataStr, Literal, RecordDict, RecordDictPair, RecordID, TrainingData
  from dedupe.canonical import getCanonicalRep
  from dedupe.core import unique
label_desc: Use image node_id 2 for calling a global function with example usage: randomPairsMatch(n_records_A, n_records_B, sample_size) and returns: zip, iter