def create_plot_data(convert_data: list, batch_size: int, smooth_window: int=1):
    """
    Convert metric data into x, y graph data
    :param convert_data: list of metric objects with keys [batch, epoch, value]
    :param batch_size: maximum number of batches in one epoch
    :param smooth_window: values are averaged over the size of smooth_window
    :return: (x_values, y_values) => tuple of x,y values for the scatter plot
    """
    x_values = []
    y_values = []

    window_counter = 0
    sum_value = 0
    for i, data in enumerate(convert_data):
        sum_value += float(data["value"])

        window_counter += 1
        if window_counter == smooth_window or i == len(convert_data) - 1:
            decimal = (float(data["batch"]) / batch_size)
            x_val = float(data["epoch"]) + decimal
            x_values.append(x_val)
            y_val = sum_value / window_counter
            y_values.append(y_val)
            window_counter = 0
            sum_value = 0

    return x_values, y_values