def METHOD_NAME(
    *,
    envs_enabled: bool = True,
    env_tgt: LocalEnvironmentTarget | RemoteEnvironmentTarget | DockerEnvironmentTarget | None,
    remote_execution: bool,
    expected: Platform,
) -> None:
    global_options = create_subsystem(GlobalOptions, remote_execution=remote_execution)
    name = "name"
    env_subsystem = create_subsystem(
        EnvironmentsSubsystem,
        names={name: "addr"} if envs_enabled else {},
    )
    result = run_rule_with_mocks(
        current_platform,
        rule_args=[EnvironmentTarget(name, env_tgt), global_options, env_subsystem],
    )
    assert result == expected