def METHOD_NAME(data, selection):
    """
    Use either Orange's create_annotated_table (for at most 1 selected class
    or create_groups_table (for more selected classes)
    :param data: Orange data table
    :param selection: classes for selected indices (0 for unselected)
    :return: Orange data table with an added column
    """
    if len(selection) and np.max(selection) > 1:
        return create_groups_table(data, selection)
    else:
        return create_annotated_table(data, np.flatnonzero(selection))