def _plot_series(series, ax_id, linewidth, label_name, **kwargs):
    """Internal function called by `show_anomalies_from_scores()`

    Plot the series on the given axes ax_id.

    Parameters
    ----------
    series
        The series to plot.
    ax_id
        The axis the series will be plotted on.
    linewidth
        Thickness of the line.
    label_name
        Name that will appear in the legend.
    """
    for i, c in enumerate(series._xa.component[:10]):
        comp = series._xa.sel(component=c)

        if comp.sample.size > 1:
            central_series = comp.mean(dim="sample")
            low_series = comp.quantile(q=0.05, dim="sample")
            high_series = comp.quantile(q=0.95, dim="sample")
        else:
            central_series = comp

        label_to_use = (
            (label_name + ("_" + str(i) if len(series.components) > 1 else ""))
            if label_name != ""
            else "" + str(str(c.values))
        )

        central_series.plot(ax=ax_id, linewidth=linewidth, label=label_to_use, **kwargs)

        if comp.sample.size > 1:
            ax_id.fill_between(
                series.time_index, low_series, high_series, alpha=0.25, **kwargs
            )
Internal function called by `show_anomalies_from_scores()`

    Plot the series on the given axes ax_id.

    Parameters
    ----------
    series
        The series to plot.
    ax_id
        The axis the series will be plotted on.
    linewidth
        Thickness of the line.
    label_name
        Name that will appear in the legend.
    
darts/ad/utils.py