//  [python]
def plot_csvs(dir_paths, ylim=(-12, -6), plot_best=False, return_best=False, use_norm_score=False, obj='logp',
              successive=True):
    """
    get scores in successive dfs.
    Expect the names to be in format *_iteration.csv
    Expect to contain a 'score' column to get mean and std over
    :param ylim : scores range for plt plot
    :param plot_best: show best score for each iter with a red dot on the errorbars plot
    :param return_best: returns a list of best smiles with their scores 
    :param path:
    :return:
    """

    if not isinstance(dir_paths, list):  # plot only one cbas
        print(dir_paths)
        fig, ax = plt.subplots(1, 2)
        iterations, mus, stds, batch_size, newslist, title, best_scores, best_smiles = plot_one(dir_paths,
                                                                                                use_norm_score,
                                                                                                obj,
                                                                                                successive=successive)
        print(newslist)
        mus = np.array(mus)
        stds = np.array(stds)
        ax[0].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
        sns.lineplot(iterations, mus, ax=ax[0])

        if plot_best:
            ax[0].plot(iterations, best_scores, 'r.')
        ax[0].set_ylim(ylim[0], ylim[1])
        ax[0].set_xlim(1, iterations[-1] + 0.2)

        ax[1].set_ylim(0, batch_size + 100)
        ax[1].plot(iterations, newslist)
        sns.despine()
        ax[0].set_xlabel('Iterations')
        ax[0].set_ylabel('Docking Score (kcal/mol)')
        ax[1].set_xlabel('Iterations')
        ax[1].set_ylabel('Novel samples')
        fig.tight_layout(pad=2.0)
        fig.align_labels()
    else:  # plot multiple

        # DEBUG for figure production
        fig, ax = plt.subplots(2, len(dir_paths))
        if False:

            bo, cbas = dir_paths
            iterations, mus, stds, batch_size, newslist, title, best_scores, best_smiles = plot_one(bo,
                                                                                                    use_norm_score,
                                                                                                    obj,
                                                                                                    successive=successive)
            mus = -np.array(mus)
            stds = -np.array(stds)

            ax[0].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
            sns.lineplot(iterations, mus, ax=ax[0])
            if plot_best:
                ax[0].plot(iterations, best_scores, 'r.')
            ax[0].set_ylim(ylim[0], ylim[1])

            print(best_scores)

            ax[0].set_xlabel('Iterations')
            ax[0].set_ylabel('cLogP Score')

            iterations, mus, stds, batch_size, newslist, title, best_scores, best_smiles = plot_one(cbas,
                                                                                                    use_norm_score,
                                                                                                    obj,
                                                                                                    successive=successive)
            mus = np.array(mus)
            stds = np.array(stds)

            ax[1].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
            sns.lineplot(iterations, mus, ax=ax[1])
            if plot_best:
                ax[1].plot(iterations, best_scores, 'r.')
            ax[1].set_ylim(ylim[0], ylim[1])

            ax[1].set_xlabel('Iterations')

            # fig.tight_layout(pad=2.0)
            fig.align_labels()
        else:
            for i, dir_path in enumerate(dir_paths):
                iterations, mus, stds, batch_size, newslist, title, best_scores, best_smiles = plot_one(dir_path,
                                                                                                        use_norm_score,
                                                                                                        obj,
                                                                                                        successive=successive)
                mus = np.array(mus)
                stds = np.array(stds)
                ax[0, i].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
                ax[0, i].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
                sns.lineplot(iterations, mus, ax=ax[0, i])

                if plot_best:
                    ax[0, i].plot(iterations, best_scores, 'r*')
                ax[0, i].set_ylim(*ylim)
                ax[0, i].set_xlim(1, iterations[-1] + 0.5)
                # ax[0, i].set_title(title)

                ax[1, i].set_ylim(0, batch_size + 100)
                ax[1, i].plot(iterations, newslist)

                # ax[0].fill_between(iterations, mus + stds, mus - stds, alpha=.25)
                # sns.lineplot(iterations, mus, ax=ax[0])

    plt.savefig("cbas_fig.pdf", format="pdf")
    plt.show()

    if return_best:
        return best_smiles