def plot_or_figure(fig, plot=True):
    """
    
    Parameters
    ----------
    fig: matplotlib.figure.Figure
        figure to plot or to returns
    plot: bool (default True)
        Whether you want to plot a figure or 
        return it

    Returns
    -------
    matplotlib.figure.Figure
        Figure
    """
    if plot:
        fig.show()
    else:
        return fig