def get_preferred_indices(y_pos, labels, preferred_sensors):
    """Get indices of preferred sensor sets in plot.

    Args:
        y_pos (list): list of y positions used for sensors in plot.
        labels (list-like): sensor set labels associated with y_pos.
        preferred_sensors (list-like): preferred sensor sets.

    Returns:
        indices (list): y positions associated with preferred sets.

    """
    labels = list(labels)
    indices = []
    for sensor in preferred_sensors:
        label_idx = labels.index(sensor)
        indices.append(y_pos[label_idx])
    return indices