def METHOD_NAME(DB_feat, cand_feat, sim_cutoff, bins, cdf_list):
    '''Given features of DB images, compute cosine similarity
    and define a match if cosine similarity is above a cutoff.'''
    if len(cand_feat) == 0:
        print('Found 0 logos from 0 classes')
        return {}, np.array([])
    cos_sim = cosine_similarity(X = DB_feat, Y = cand_feat)
    cos_sim = np.round(cos_sim, 3) # approximate cos_sim for consistency
    # for each input, return matches if above threshold
    matches = {}
    for i in range(len(DB_feat)):
        match_indices = np.where(cos_sim[i] >= sim_cutoff[i])
        # to avoid double positives, it will pick feat with better cosine similarity
        for idx in match_indices[0]:
            cdf_match = cdf_list[i][bins[:-1] < cos_sim[i, idx]][-1]
            if idx not in matches: # if cand not seen previously, current brand is best guess
                matches[idx] = (i, cdf_match)
            elif matches[idx][1] < cdf_match: # previously seen but lower confidence, replace with current cand
                matches[idx] = (i, cdf_match)
            else:
                continue
    n_classes = len(np.unique([v[0] for v in matches.values()]))
    print(f'Found {len(matches)} logos form {n_classes} classes.')
    return matches, cos_sim