def __init__(
        self,
        enable_sanity_check_bar: bool = True,
        enable_train_bar: bool = True,
        enable_validation_bar: bool = True,
        enable_prediction_bar: bool = True,
        enable_train_bar_only: bool = False,
        **kwargs,
    ):
        """Darts' Progress Bar for `TorchForecastingModels`.

        Allows to customize for which model stages (sanity checks, training, validation, prediction) to display a
        progress bar.

        This class is a PyTorch Lightning `Callback` and can be passed to the `TorchForecastingModel` constructor
        through the `pl_trainer_kwargs` parameter.

        Examples
        --------
        >>> from darts.models import NBEATSModel
        >>> from darts.utils.callbacks import TFMProgressBar
        >>> # only display the training bar and not the validation, prediction, and sanity check bars
        >>> prog_bar = TFMProgressBar(enable_train_bar_only=True)
        >>> model = NBEATSModel(1, 1, pl_trainer_kwargs={"callbacks": [prog_bar]})

        Parameters
        ----------
        enable_sanity_check_bar
            Whether to enable to progress bar for sanity checks.
        enable_train_bar
            Whether to enable to progress bar for training.
        enable_validation_bar
            Whether to enable to progress bar for validation.
        enable_prediction_bar
            Whether to enable to progress bar for prediction.
        enable_train_bar_only
            Whether to disable all progress bars except the bar for training.
        **kwargs
            Arguments passed to the PyTorch Lightning's `TQDMProgressBar
            <https://scikit-learn.org/stable/glossary.html#term-random_state>`_.
        """
        super().__init__(**kwargs)
        self.enable_sanity_check_bar = enable_sanity_check_bar
        self.enable_train_bar = enable_train_bar
        self.enable_validation_bar = enable_validation_bar
        self.enable_prediction_bar = enable_prediction_bar
        self.enable_train_bar_only = enable_train_bar_only
Darts' Progress Bar for `TorchForecastingModels`.

        Allows to customize for which model stages (sanity checks, training, validation, prediction) to display a
        progress bar.

        This class is a PyTorch Lightning `Callback` and can be passed to the `TorchForecastingModel` constructor
        through the `pl_trainer_kwargs` parameter.

        Examples
        --------
        >>> from darts.models import NBEATSModel
        >>> from darts.utils.callbacks import TFMProgressBar
        >>> # only display the training bar and not the validation, prediction, and sanity check bars
        >>> prog_bar = TFMProgressBar(enable_train_bar_only=True)
        >>> model = NBEATSModel(1, 1, pl_trainer_kwargs={"callbacks": [prog_bar]})

        Parameters
        ----------
        enable_sanity_check_bar
            Whether to enable to progress bar for sanity checks.
        enable_train_bar
            Whether to enable to progress bar for training.
        enable_validation_bar
            Whether to enable to progress bar for validation.
        enable_prediction_bar
            Whether to enable to progress bar for prediction.
        enable_train_bar_only
            Whether to disable all progress bars except the bar for training.
        **kwargs
            Arguments passed to the PyTorch Lightning's `TQDMProgressBar
            <https://scikit-learn.org/stable/glossary.html#term-random_state>`_.
        
darts/utils/callbacks.py