def _scrub_composite_distance_features(distance, feature_blacklist):
    """
    Remove feature names from the feature lists in a composite distance
    function.
    """
    dist_out = []

    for i, d in enumerate(distance):
        ftrs, dist, weight = d
        new_ftrs = [x for x in ftrs if x not in feature_blacklist]
        if len(new_ftrs) > 0:
            dist_out.append([new_ftrs, dist, weight])

    return dist_out
Remove feature names from the feature lists in a composite distance
    function.