def filterLargeClusters(clusters, input_size, cluster_fraction_thresh):
    """ Remove big clusters which have more points than a given fraction of total points in the input data. 

    Arguments:
        clusters: [list] a python list containing found clusters in the reachability diagram plot (optional)
            - note: individual cluster is just a list of point indices belonging to a specific cluster
        input_size: [int] total number of all data points used for clustering
        cluster_fraction_thresheld: [float] a number that defines the maximum ratio of the largest acceptable
            cluster size and the total number of all points used for clustering

    Return:
        filtered_clusters: [list] a list of clusters where the largle clusters were removed

    """

    filtered_clusters = []

    # Go through every cluster and check if it is too big
    for cluster in clusters:

        # If the cluster is small enough, add it to the list
        if len(cluster) < cluster_fraction_thresh*input_size and len(cluster) > 0:

            filtered_clusters.append(cluster)

    return filtered_clusters