def _build_selpand(item, attributes):
    """
    This method builds an expand or select term for an STA Query
    :param item: string either expand or select
    :param attributes: a list of strings that has to be expanded / selected
    :return: the resulting select or expand-term
    """
    selector = item + "="
    if not isinstance(attributes, list):
        attributes = [attributes]
    for i, attribute in enumerate(attributes):
        if i != 0:
            selector += ","
        selector += str(attribute)
    return selector