def METHOD_NAME(self, reference_data: pd.DataFrame, *args, **kwargs):
    """Fits the drift calculator to a set of reference data."""
    if reference_data.empty:
        raise InvalidArgumentsException('data contains no rows. Please provide a valid data set.')
    reference_chunk_results = np.asarray(
        [self._calculate_count_value_stats(chunk.data) for chunk in self.chunker.split(reference_data)]
    )
    self._lower_alert_threshold, self._upper_alert_threshold = calculate_threshold_values(
        threshold=self.threshold,
        data=reference_chunk_results,
        lower_threshold_value_limit=self.lower_threshold_value_limit,
        upper_threshold_value_limit=self.upper_threshold_value_limit,
        logger=self._logger,
        metric_name=self.simple_stats_metric,
        override_using_none=True,
    )
    self.result = self._calculate(data=reference_data)
    self.result.data[('chunk', 'period')] = 'reference'
    return self