def get_data_priority_value(metrics_on_test, data_item, target_priority):
    """
    Collect a priority metric from the dataset.
    :param metrics_on_test: Metrics on dataset
    :param data_item: Metric name
    :param target_priority: Priority
    :return: List of values from dataset.
    """
    results_per_priority = [data['results_per_priority'] for data in metrics_on_test]

    metric_values = []
    for priority_list in results_per_priority:
        metric_values.append(
            [data[data_item] for data in priority_list if data['priority'] == target_priority][0])

    return metric_values