def expand_features_and_labels(x_feat, y_labels):
    """
    Take features and labels and expand them into labelled examples for the
    model.
    """
    x_expanded = []
    y_expanded = []
    for x, y in zip(x_feat, y_labels):
        for segment in x:
            x_expanded.append(segment)
            y_expanded.append(y)
    return x_expanded, y_expanded