def METHOD_NAME(
    env: str = "mujoco_ant",
    num_workers: int = 8,
    train_steps: int = 4096,
    batched_sampling: bool = True,
    serial_mode: bool = True,
    async_rl: bool = False,
    batch_size: int = 2048,
    rollout: int = 8,
    expected_max_policy_lag: int = 100,
    customize_cfg_func: Optional[Callable[[Config], None]] = None,
):
    log.debug(f"Testing with parameters {locals()}...")
    assert train_steps > batch_size, "We need sufficient number of steps to accumulate at least one batch"
    experiment_name = f"test_envpool_{num_workers}_{env}"
    from sf_examples.envpool.mujoco.train_envpool_mujoco import parse_mujoco_cfg
    cfg = parse_mujoco_cfg(argv=["--algo=APPO", f"--env={env}", f"--experiment={experiment_name}"])
    cfg.serial_mode = serial_mode
    cfg.async_rl = async_rl
    cfg.batched_sampling = batched_sampling
    cfg.num_workers = num_workers
    cfg.num_envs_per_worker = 1
    cfg.worker_num_splits = 1
    cfg.env_agents = 32
    cfg.train_for_env_steps = train_steps
    cfg.batch_size = batch_size
    cfg.rollout = rollout
    cfg.decorrelate_envs_on_one_worker = False
    cfg.decorrelate_experience_max_seconds = 0
    cfg.seed = 0
    cfg.device = "cpu"
    if customize_cfg_func is not None:
        customize_cfg_func(cfg)
    directory = clean_test_dir(cfg)
    cfg, runner = make_runner(cfg)
    status = runner.init()
    if status == ExperimentStatus.SUCCESS:
        status = runner.run()
    assert status == ExperimentStatus.SUCCESS
    for key in ["version_diff_min", "version_diff_max", "version_diff_avg"]:
        assert runner.policy_lag[0][key] <= expected_max_policy_lag
    assert isdir(directory)
    shutil.rmtree(directory, ignore_errors=True)