code: def recall(
      doc,
      query,
      topk,
      sample_count,
      pk_p,
      distance_p,
      row_number=None,
      column_number=None,
      topk_ids=None,
      method=None,
      epsilon=1e-6,
      session=None,
      run_kwargs=None,
  ):
      if topk_ids is None:
          topk_ids = [topk]
      if method is None:
          method = "BYSCORE"
  
      query_sample, idx = sample_data(
          query=query, sample_count=sample_count
      )
      pk_p_sample, distance_p_sample = pk_p[idx, :], distance_p[idx, :]
      pk_l, distance_l = linear_build_and_search(
          doc=doc,
          query=query_sample,
          topk=topk,
          row_number=row_number,
          column_number=column_number,
      )
  
      r = mr.spawn(
          compute_recall,
          args=(
              pk_l,
              distance_l,
              pk_p_sample,
              distance_p_sample,
              topk_ids,
              method,
              epsilon,
          ),
      )
      return r.execute(
          session=session, **(run_kwargs or dict())
      ).fetch()
  
file_path: mars/mars/learn/proxima/simple_index/recall.py
imports: import math
  import numpy
  from ....None import remote
  from .knn import sample_data, linear_build_and_search
label_desc: Use image node_id 4 for calling a global function with example usage: recall(doc, query, topk, sample_count, pk_p, distance_p, row_number, column_number, topk_ids, method, epsilon, session, run_kwargs) and returns: r