def METHOD_NAME(wandb_init):
    """Ensure that `wandb.init(dir=DIR)` creates the proper directory and nothing else."""
    default_path = os.path.join(os.getcwd(), "wandb")
    dir_name = "dir_custom"
    custom_dir_path = os.path.join(os.getcwd(), dir_name)
    # test for the case that the dir is set
    reload_fn(wandb)
    _remove_dir_if_exists(default_path)
    if not os.path.isdir(custom_dir_path):
        os.makedirs(custom_dir_path)
    run = wandb_init(dir="./" + dir_name)
    run.finish()
    assert not os.path.isdir(default_path), f"Unexpected directory at {default_path}"
    assert os.path.isdir(custom_dir_path), f"Expected directory at {custom_dir_path}"
    # And for the duplicate-run case
    _remove_dir_if_exists(default_path)
    run = wandb_init(dir="./" + dir_name)
    run.finish()
    assert not os.path.isdir(default_path), f"Unexpected directory at {default_path}"
    assert os.path.isdir(custom_dir_path), f"Expected directory at {custom_dir_path}"