def METHOD_NAME(
    x, y, xlabel, ylabel, cols=1, rows=1, same_x=False, ylabel_title=True, to_file=None
):
    """Make a grid of plots.
    Args:
        x: values for x-axis. If all plots have the same x-axis the same_x arg
            should be True, and only one x-value list is need, otherwise x should
            be a list of x value lists.
        y: list of lists of y values for plots
        xlabel: if same_x=True, a x-axis label, if same_x=False, list of xaxis
            labels
        ylable: list of y-axis labels
        cols: number of columns in plot grid
        rows: number of rows in plot grid
        same_x: If True use the same x-axis for all plots, otherwise expect a
            list of x-axis data for the x-axis of each plot
        ylabel_title: If True, use the ylabel for the plot title, otherwise label
            the y-axis
    Returns:
        matplotlib.pyplot
    """
    assert cols * rows >= len(y)
    for i, yi in enumerate(y):
        yilabel = ylabel[i]
        if same_x:
            xi = x
            xilabel = xlabel
        else:
            xi = x[i]
            xilabel = xlabel[i]
        plt.subplot(rows, cols, i + 1)
        plt.xlabel(xilabel)
        plt.plot(xi, yi)
        if ylabel_title:
            plt.title(yilabel)
        else:
            plt.ylabel(yilabel)
    plt.tight_layout()
    if to_file:
        plt.savefig(to_file)
    else:
        plt.show()
    return plt