def double_hashing(delta, h1, h2):
    """
    derive independant hash function based on hash function h1, h2
    :param delta: weight param in the double-hashing process
    :param h1: hash function
    :param h2: hash function
    :return: a new hash function equals h1 + delta * h2
    """
    def new_hash(msg):
        return h1(msg) + delta * h2(msg)
    return new_hash