def legacySTAkwargs(**kwargs):
    """Provide support for legacy SpikeTrainArray
    kwargs. This function is primarily intended to be
    a helper for the new STA constructor, not for
    general-purpose use.

    kwarg: time        <==> timestamps <==> abscissa_vals
    kwarg: data        <==> ydata
    kwarg: unit_ids    <==> series_ids
    kwarg: unit_labels <==> series_labels
    kwarg: unit_tags   <==> series_tags

    Examples
    --------
    sta = nel.SpikeTrainArray(time=..., )
    sta = nel.SpikeTrainArray(timestamps=..., )
    sta = nel.SpikeTrainArray(abscissa_vals=..., )
    """

    def only_one_of(*args):
        num_non_null_args = 0
        out = None
        for arg in args:
            if arg is not None:
                num_non_null_args += 1
                out = arg
        if num_non_null_args > 1:
            raise ValueError ('multiple conflicting arguments received')
        return out

    # legacy STA constructor support for backward compatibility
    abscissa_vals = kwargs.pop('abscissa_vals', None)
    timestamps = kwargs.pop('timestamps', None)
    time = kwargs.pop('time', None)
    # only one of the above, otherwise raise exception
    abscissa_vals = only_one_of(abscissa_vals, timestamps, time)
    if abscissa_vals is not None:
        kwargs['abscissa_vals'] = abscissa_vals

    # Other legacy attributes
    series_ids = kwargs.pop('series_ids', None)
    unit_ids = kwargs.pop('unit_ids', None)
    series_ids = only_one_of(series_ids, unit_ids)
    kwargs['series_ids'] = series_ids

    series_labels = kwargs.pop('series_labels', None)
    unit_labels = kwargs.pop('unit_labels', None)
    series_labels = only_one_of(series_labels, unit_labels)
    kwargs['series_labels'] = series_labels

    series_tags = kwargs.pop('series_tags', None)
    unit_tags = kwargs.pop('unit_tags', None)
    series_tags = only_one_of(series_tags, unit_tags)
    kwargs['series_tags'] = series_tags

    return kwargs