def METHOD_NAME(request, tmpdir):
    """
    Fixture that prepares a simulation directory with a populated west.cfg file.
    """
    test_dir = str(tmpdir)
    os.chdir(test_dir)
    copy_ref(test_dir)
    copyfile(os.path.join(REFERENCE_PATH, 'west_init_ref.cfg'), CFG_FILENAME)
    copyfile(os.path.join(REFERENCE_PATH, 'west_init_ref.h5'), "west_init_ref.h5")
    request.cls.cfg_filepath = CFG_FILENAME
    request.cls.h5_filepath = H5_FILENAME
    request.cls.ref_h5_filepath = 'west_init_ref.h5'
    os.environ['WEST_SIM_ROOT'] = test_dir
    westpa.rc = westpa.core._rc.WESTRC()
    request.addfinalizer(clear_state)