def build_tags(item):
    """
    Build the row of tags for a CSV file
    :param item: A test item, normally the first test item in responses of a test
    :return: CSV format string
    """
    if item['type'] == 1:  # Question
        return ''
    elif item['type'] == 2 or item['type'] == 3:  # Example or training also will get tags fields
        if 'example' in item and 'tags' in item['example']:
            return (item['example']['tags'] or '').replace(',', '|')
        else:
            return ''
    else:
        return None