def _format_samples(
        self, samples: np.ndarray, labels: Optional[np.ndarray] = None
    ) -> tuple[Any, Any]:
        """
        Validate and format the categorical columns listed in self._categorical_indices accordingly to the model's
        requirements.
        """
        if len(self._categorical_indices) != 0:
            self._validate_categorical_components(samples)
        return samples, labels

        Validate and format the categorical columns listed in self._categorical_indices accordingly to the model's
        requirements.
        
darts/models/forecasting/sklearn_model.py