def METHOD_NAME(force: bool, clip: int, mode):
    """Run the inverse stability experiments."""
    results_path = INVERSE_STABILITY / "results.tsv"
    if results_path.exists() and not force:
        df = pd.read_csv(results_path, sep="\t")
        df["residuals"] = df["forward"] - df["inverse"]
        df = df[(-clip < df["residuals"]) & (df["residuals"] < clip)]
        g = sns.FacetGrid(df, col="model", row="dataset", hue="training_loop", sharex=False, sharey=False)
        g.map_dataframe(sns.histplot, x="residuals", stat="density")
        g.add_legend()
        g.savefig(INVERSE_STABILITY / "results_residuals.png", dpi=300)
    else:
        outer_dfs = []
        datasets = ["nations", "kinships"]
        models = ["rotate", "complex", "simple", "transe", "distmult"]
        training_loops = ["lcwa", "slcwa"]
        for dataset, model, training_loop in itt.product(datasets, models, training_loops):
            click.secho(f"{dataset} {model} {training_loop}", fg="cyan")
            df = run_inverse_stability_workflow(dataset=dataset, model=model, training_loop=training_loop, mode=mode)
            outer_dfs.append(df)
        outer_df = pd.concat(outer_dfs)
        outer_df.to_csv(INVERSE_STABILITY / "results.tsv", sep="\t", index=False)