def query_shard(args):
    query, shard = args # simulate starmap (not part of multiprocessing in older Pythons)
    logger.debug("querying shard %s num_best=%s in process %s" % (shard, shard.num_best, os.getpid()))
    result = shard[query]
    logger.debug("finished querying shard %s in process %s" % (shard, os.getpid()))
    return result
dataset/ETHPy150Open largelymfs/topical_word_embeddings/TWE-1/gensim/similarities/docsim.py/query_shard/original