def create_coordinate_clusters(coordinates, cluster_labels):
    """
    Create cluster arrays of the input coordinate data from cluster labels.
    """
    clusters = []
    last_label, cluster = None, None
    for idx, label in enumerate(cluster_labels):
        is_new_cluster = label != -1 and last_label != label
        if is_new_cluster:
            if cluster:
                clusters.append(cluster)
            cluster = []
            last_label = label
        if label != -1:
            cluster.append(coordinates[idx])
    return clusters
