def set_spines(ax, plot_params):
    """
    Sets spines of the shift graph to be invisible if chosen by the user

    Parameters
    ----------
    ax: Matplotlib ax
        Current ax of the shift graph
    plot_parms: dict
        Dictionary of plotting parameters. Here `invisible_spines` is used
    """
    spines = plot_params["invisible_spines"]
    if spines:
        for spine in spines:
            if spine in {"left", "right", "top", "bottom"}:
                ax.spines[spine].set_visible(False)
            else:
                print("invalid spine argument")
    return ax