code: def _get_predictions_by_sensitive_feature(
      adjusted_predictor, sensitive_features, scores, labels
  ):
      labels_and_predictions = defaultdict(list)
      sensitive_features_mapped = _map_into_single_column(
          sensitive_features
      )
      for i in range(len(sensitive_features_mapped)):
          labels_and_predictions[sensitive_features_mapped[i]].append(
              LabelAndPrediction(
                  labels[i],
                  adjusted_predictor(
                      [sensitive_features_mapped[i]], [scores[i]]
                  ),
              )
          )
      return labels_and_predictions
  
imports: from collections import defaultdict, namedtuple
  from test.unit.input_convertors import _map_into_single_column, ensure_dataframe, ensure_list_1d, ensure_ndarray, ensure_ndarray_2d, ensure_series
  import numpy
  import pandas
  import pytest
  from sklearn.base import BaseEstimator, ClassifierMixin
  from fairlearn.postprocessing._constants import LABEL_KEY, SCORE_KEY, SENSITIVE_FEATURE_KEY
  from fairlearn.postprocessing._threshold_operation import ThresholdOperation
label_desc: Use image node_id 7 for calling a global function with example usage: _get_predictions_by_sensitive_feature(adjusted_predictor, sensitive_features, scores, labels) and returns: labels_and_predictions