def set_timeseries_labels(timeseries, timeseries_labels):
    """
    Sets label attribute of timeseries, later used in plotting functions.
    Suitable for single timeseries as well as for several timeseries (handed over in a list).
    """
    if not isinstance(timeseries, list):
        timeseries.label = timeseries_labels
    else:
        for ts in timeseries:
            ts.label = timeseries_labels[timeseries.index(ts)]
