code: def recall_one(linear_score, ann_score, topk_ids, epsilon=1e-6):
      topk_matchs = {}
      for ids in topk_ids:
          topk_matchs[ids] = 0
      length = len(linear_score)
      match = 0
      idx, ann_item = 0, 0
      while idx < length:
          cur_topk = idx + 1
          if ann_item < len(ann_score):
              if (
                  math.fabs(linear_score[idx] - ann_score[ann_item])
                  < epsilon
              ):
                  ann_item += 1
                  idx += 1
                  match += 1
              else:
                  if linear_score[idx] < ann_score[ann_item]:
                      idx += 1  # linear
                  else:
                      ann_item += 1  # ann
          else:
              idx += 1
  
          if cur_topk in topk_ids:
              topk_matchs[cur_topk] = match / cur_topk
  
      return topk_matchs
  
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 1 for calling a global function with example usage: recall_one(linear_score, ann_score, topk_ids, epsilon) and returns: topk_matchs