def similarity_threshold(h, bands):
    """
    Function returning the Jaccard similarity threshold for minhash signature
    composed of h integers and a signature matrix divided in n bands.

    Args:
        h (int): Number of integers in the minhash signature.
        bands (int): Number of bands dividing the signature matrix.

    Returns:
        float: The Jaccard similarity threshold.

    """
    return (1.0 / bands) ** (1 / (h / bands))