def _create_dict_from_grouping(data, source_columns, time_column, group_by, color):
    if (not source_columns):
        data_columns = set(['NewProcessName', 'EventID', 'CommandLine'])
    else:
        data_columns = set(source_columns)
    data_columns.add(time_column)
    series_dict: Dict[(str, Dict)] = {}
    if group_by:
        data_columns.add(group_by)
        grouped_data = data[list(data_columns)].groupby(group_by)
        series_count = len(grouped_data)
        (colors, palette_size) = _get_color_palette(series_count)
        color_index = 0
        for (group_name, group_df) in grouped_data:
            series_dict[str(group_name)] = dict(data=group_df, time_column=time_column, source_columns=source_columns, color=colors[(color_index % palette_size)])
            color_index += 1
    else:
        group_df = data[list(data_columns)].copy()
        series_dict['unnamed series'] = dict(data=group_df, time_column=time_column, source_columns=source_columns, color=color)
    return series_dict
def _create_dict_from_grouping(data, source_columns, time_column, group_by, color):
    if (not source_columns):
        data_columns = set(['NewProcessName', 'EventID', 'CommandLine'])
    else:
        data_columns = set(source_columns)
    data_columns.add(time_column)
    series_dict: Dict[(str, Dict)] = {}
    if group_by:
        data_columns.add(group_by)
        grouped_data = data[list(data_columns)].groupby(group_by)
        series_count = len(grouped_data)
        (colors, palette_size) = _get_color_palette(series_count)
        color_index = 0
        for (group_name, group_df) in grouped_data:
            series_dict[str(group_name)] = dict(data=group_df, time_column=time_column, source_columns=source_columns, color=colors[(color_index % palette_size)])
            color_index += 1
    else:
        group_df = data[list(data_columns)].copy()
        series_dict['unnamed series'] = dict(data=group_df, time_column=time_column, source_columns=source_columns, color=color)
    return series_dict