def H_largest_cluster_threshold(swarm, threshold):
    """ Makes a function for halting once the largest cluster activity is over
    a fixed threshold """

    def H():

        return swarm.largest_cluster.size >= threshold

    return H