<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def learn_transportation_mode(track, clf):
 """ Inserts transportation modes of a track into a classifier Args: track (:obj:`Track`) clf (:obj:`Classifier`) """

    for segment in track.segments:
        tmodes = segment.transportation_modes
        points = segment.points
        features = []
        labels = []

        for tmode in tmodes:
            points_part = points[tmode['from']:tmode['to']]
            if len(points_part) > 0:
                features.append(extract_features_2(points_part))
                labels.append(tmode['label'])

        clf.learn(features, labels)