//  [python]
def coherence_scores(transition_scores_raw, model_names=None, model_label = 'Model', raw=False, custom_colors = None, height=4, aspect=1):

    if model_names == None:

        if raw == False:
            
            transition_scores_ = pd.DataFrame({" ": [t for t in transition_scores_raw.keys()], "ICCoh score": transition_scores_raw.values()})
            
            ax = sns.barplot(
                data=transition_scores_, 
                y=" ", x="ICCoh score", color='k',
                ci="sd", alpha=.6
            ) #color='k', 
            #ax.set_xticklabels(rotation=90)
            ax.set(xlim=(-1, 1))
            plt.gcf().set_size_inches(aspect*height, height)
            
            return ax

        else:
            
            score = []
            transition = []
            embedding=[]
            
            for key in transition_scores_raw.keys():
                for item in transition_scores_raw[key]:
                    score.append(item)
                    transition.append(key)
            
            transition_scores_ = pd.DataFrame({'ICCoh score':score, ' ':transition})
            
            PROPS = {
            'boxprops':{'facecolor':'darkgrey', 'edgecolor':'black'},
            'medianprops':{'color':'black'},
            'whiskerprops':{'color':'black'},
                'capprops':{'color':'black'}
            }
            
            ax = sns.boxplot(
                data=transition_scores_, 
                y=' ', x="ICCoh score",  
                fliersize=0, **PROPS, showmeans=True,
                            meanprops={"marker":"o",
                       "markerfacecolor":"white", 
                       "markeredgecolor":"black",
                      "markersize":"8"}
            )
            ax.set(xlim=(-1, 1))
            plt.gcf().set_size_inches(aspect*height, height)
            return ax
        
    else:

        if raw == False:
            
            transition_scores_ = [pd.DataFrame({" ": [t for t in tscores.keys()], "ICCoh score": tscores.values()}) for tscores in transition_scores_raw]
            
            for i in range(len(model_names)):
                transition_scores_[i][model_label] = model_names[i]
                
            transition_scores_ = pd.DataFrame(pd.concat(transition_scores_, axis=0))
            
            ax = sns.barplot(
                data=transition_scores_, 
                y=" ", x="ICCoh score", hue=model_label,
                ci="sd", alpha=1, palette = 'Set1', showmeans=True,
                            meanprops={"marker":"o",
                       "markerfacecolor":"white", 
                       "markeredgecolor":"black",
                      "markersize":"8"}
            ) #color='k', 
            #ax.set_xticklabels(rotation=90)
            ax.set(xlim=(-1, 1))
            plt.gcf().set_size_inches(aspect*height, height)
            
            return ax    

        else:

            score = []
            transition = []
            embedding=[]
            
            for items, name in zip(transition_scores_raw, model_names):
                for key in items.keys():
                    for item in items[key]:
                        score.append(item)
                        transition.append(key)
                        embedding.append(name)

            transition_scores_ = pd.DataFrame({'ICCoh score':score, ' ':transition, model_label:embedding})
            
            if np.any(custom_colors != None):
                ax = sns.boxplot(
                    data=transition_scores_, 
                    y=' ', x="ICCoh score", hue=model_label,
                    palette = custom_colors, fliersize=0
                )
            else:
                ax = sns.boxplot(
                    data=transition_scores_, 
                    y=' ', x="ICCoh score", hue=model_label,
                    palette = 'Set1', fliersize=0, showmeans=True,
                            meanprops={"marker":"o",
                       "markerfacecolor":"white", 
                       "markeredgecolor":"black",
                      "markersize":"8"}
                ) #color='k',
            #ax.set_xticklabels(rotation=90)
            ax.set(xlim=(-1, 1))
            plt.gcf().set_size_inches(aspect*height, height)
            
            #ax.fig.suptitle('Model c)')
            return ax