def METHOD_NAME(datadir):
    data = json.load(datadir.joinpath("hypotest_results.json").open(encoding="utf-8"))
    matplotlib.use("agg")  # Use non-gui backend
    fig, ax = plt.subplots()
    ax.set_yscale("log")  # Also test log y detection
    brazil.plot_results(data["testmus"], data["results"], test_size=0.05)
    return fig