code: def _reformat_data_into_dict(key, data_dict, additional_data):
      """Add `additional_data` to `data_dict` with key `key`.
  
      Before `additional_data` is added to `data_dict` it is first
      reformatted into a numpy.ndarray or list.
  
      Parameters
      ----------
      key : str
          the key in `data_dict` at which `additional_data` should be stored;
          `key` should describe the purpose of `additional_data` in `data_dict`
      data_dict : dict
          the dictionary containing all the relevant data; `additional_data`
          will be inserted at the key `key`.
      additional_data : numpy.ndarray, pandas.DataFrame, pandas.Series, or list
          the data to be added to `data_dict` at the specified `key`
  
      Returns
      -------
      dict
          The updated `data_dict` with reformatted data at the `key` slot
      """
      if isinstance(additional_data, np.ndarray):
          if len(additional_data.shape) > 2 or (
              len(additional_data.shape) == 2
              and additional_data.shape[1] > 1
          ):
              # TODO: extend to multiple columns for additional_group data
              raise ValueError(
                  MULTIPLE_DATA_COLUMNS_ERROR_MESSAGE.format(
                      "sensitive_features"
                  )
              )
          else:
              data_dict[key] = additional_data.squeeze()
      elif isinstance(additional_data, pd.DataFrame):
          # TODO: extend to multiple columns for additional_data by using column names
          for attribute_column in additional_data.columns:
              data_dict[key] = additional_data[attribute_column].values
      elif isinstance(additional_data, pd.Series):
          data_dict[key] = additional_data.values
      elif isinstance(additional_data, list):
          if isinstance(additional_data[0], list):
              if len(additional_data[0]) > 1:
                  # TODO: extend to multiple columns for additional_data
                  raise ValueError(
                      MULTIPLE_DATA_COLUMNS_ERROR_MESSAGE.format(
                          "sensitive_features"
                      )
                  )
              data_dict[key] = map(lambda a: a[0], additional_data)
          else:
              data_dict[key] = additional_data
      else:
          raise TypeError(
              UNEXPECTED_DATA_TYPE_ERROR_MESSAGE.format(
                  type(additional_data)
              )
          )
  
imports: import logging
  from warnings import warn
  import numpy
  import pandas
  from sklearn import clone
  from sklearn.base import BaseEstimator, MetaEstimatorMixin
  from sklearn.exceptions import NotFittedError
  from sklearn.utils import Bunch
  from sklearn.utils.validation import check_is_fitted
  from ..utils._common import _get_soft_predictions
  from ..utils._input_validation import _KW_CONTROL_FEATURES, _validate_and_reformat_input
  from ._constants import BASE_ESTIMATOR_NONE_ERROR_MESSAGE, BASE_ESTIMATOR_NOT_FITTED_WARNING, LABEL_KEY, OUTPUT_SEPARATOR, SCORE_KEY, SENSITIVE_FEATURE_KEY
  from ._interpolated_thresholder import InterpolatedThresholder
  from ._tradeoff_curve_utilities import METRIC_DICT, _extend_confusion_matrix, _interpolate_curve, _tradeoff_curve
label_desc: Use image node_id 2 for calling a global function with example usage: _reformat_data_into_dict(key, data_dict, additional_data) without return types