code: def get_matches(
      self, query, ref=None, threshold=None, return_tuples=False
  ):
      query_emb = self.get_embeddings(query)
      ref_emb = query_emb
      if ref is not None:
          ref_emb = self.get_embeddings(ref)
      return self.match_finder.get_matching_pairs(
          query_emb, ref_emb, threshold, return_tuples
      )
  
imports: import numpy
  import torch
  from ..distances import BatchedDistance, CosineSimilarity
  from .None import common_functions
label_desc: Use image node_id 8 for calling the InferenceModel obj's underlying member method code with example usage: obj.get_matches(query, ref, threshold, return_tuples) and returns: self