def compute_one_tfidf_distance(arg):
    all_terms = arg.global_state['all_terms']
    idf_map = arg.global_state['idf_map']

    vec_a = get_tf_idf_vector(arg.tags_a, all_terms, idf_map)
    vec_b = get_tf_idf_vector(arg.tags_b, all_terms, idf_map)
    # Cosine of angle between term vectors.
    dot_product = sum(x * y for x, y in zip(vec_a, vec_b))
    norms_product = (math.sqrt(sum(x*x for x in vec_a)) *
                     math.sqrt(sum(y*y for y in vec_b)))
    return (arg.shred_a_id, arg.shred_b_id, 1 -  dot_product / norms_product)
Disassociate a health monitor from pool
dataset/ETHPy150Open dchaplinsky/unshred-tag/metrics/tfidf.py/compute_one_tfidf_distance--crossover with--dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/api/lbaas.py/pool_monitor_association_delete