def METHOD_NAME(
    path,
    doctest,
    hidden=False,
    points=1,
    success_message=None,
    failure_message=None,
):
    test = {
        "name": os.path.splitext(os.path.basename(path))[0],
        "suites": [
            {
                "type": "doctest",
                "cases": [
                    {
                        "code": doctest,
                        "hidden": hidden,
                        "points": points,
                        "success_message": success_message,
                        "failure_message": failure_message,
                    }
                ]
            }
        ]
    }
    with open(path, "w+") as f:
        f.write(f"{OK_FORMAT_VARNAME} = True\n\ntest = ")
        pprint.pprint(test, f, indent=4, width=200, depth=None)