def METHOD_NAME(topics, rank_file, docid_idx_dict):
    logging.info('Loading base run...')
    score_dict = {}
    with open(rank_file, 'r') as f:
        curqid = None
        docids, indices, scores = [], [], []
        for line in f:
            qid, _, docid, _, score, _ = line.split(' ')
            if qid not in topics:
                continue
            # write file
            if curqid is not None and curqid != qid:
                score_dict[curqid] = [docids.copy(), indices.copy(), scores.copy()]
                del docids[:], indices[:], scores[:]
            curqid = qid
            docids.append(docid)
            indices.append(docid_idx_dict[docid])
            scores.append(float(score))
        score_dict[curqid] = [docids, indices, scores]
    return score_dict