def plot_variable_selection(
        self,
        expl_result: TFTExplainabilityResult,
        fig_size=None,
        max_nr_series: int = 5,
    ):
        """Plots the variable selection / feature importances of the `TFTModel` based on the input.
        The figure includes three subplots:

        - encoder importances: contains the past target, past covariates, and historic future covariates importance
          on the encoder (input chunk)
        - decoder importances: contains the future covariates importance on the decoder (output chunk)
        - static covariates importances: contains the numeric and / or categorical static covariates importance

        Parameters
        ----------
        expl_result
            A `TFTExplainabilityResult` object. Corresponds to the output of :func:`explain() <TFTExplainer.explain>`.
        fig_size
            The size of the figure to be plotted.
        max_nr_series
            The maximum number of plots to show in case `expl_result` was computed on multiple series.
        """
        encoder_importance = expl_result.get_encoder_importance()
        decoder_importance = expl_result.get_decoder_importance()
        static_covariates_importance = expl_result.get_static_covariates_importance()
        if not isinstance(encoder_importance, list):
            encoder_importance = [encoder_importance]
            decoder_importance = [decoder_importance]
            static_covariates_importance = [static_covariates_importance]

        uses_static_covariates = not static_covariates_importance[0].empty
        for idx, (enc_imp, dec_imp, stc_imp) in enumerate(
            zip(encoder_importance, decoder_importance, static_covariates_importance)
        ):
            # plot the encoder and decoder weights
            fig, axes = plt.subplots(
                nrows=3 if uses_static_covariates else 2, sharex=True, figsize=fig_size
            )
            self._plot_cov_selection(
                enc_imp, title="Encoder variable importance", ax=axes[0]
            )
            axes[0].set_xlabel("")
            self._plot_cov_selection(
                dec_imp, title="Decoder variable importance", ax=axes[1]
            )
            if uses_static_covariates:
                axes[1].set_xlabel("")
                self._plot_cov_selection(
                    stc_imp,
                    title="Static variable importance",
                    ax=axes[2],
                )
            fig.tight_layout()
            plt.show()

            if idx + 1 == max_nr_series:
                break
Plots the variable selection / feature importances of the `TFTModel` based on the input.
        The figure includes three subplots:

        - encoder importances: contains the past target, past covariates, and historic future covariates importance
          on the encoder (input chunk)
        - decoder importances: contains the future covariates importance on the decoder (output chunk)
        - static covariates importances: contains the numeric and / or categorical static covariates importance

        Parameters
        ----------
        expl_result
            A `TFTExplainabilityResult` object. Corresponds to the output of :func:`explain() <TFTExplainer.explain>`.
        fig_size
            The size of the figure to be plotted.
        max_nr_series
            The maximum number of plots to show in case `expl_result` was computed on multiple series.
        
darts/explainability/tft_explainer.py