<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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