def METHOD_NAME(
    env_id: str, namespace: Optional[str], name: str, version: Optional[int]
):
    gym.register(env_id, "no-entry-point")
    assert gym.spec(env_id).id == env_id
    full_name = f"{name}"
    if namespace:
        full_name = f"{namespace}/{full_name}"
    if version is not None:
        full_name = f"{full_name}-v{version}"
    assert full_name in gym.envs.registry.keys()
    del gym.envs.registry[env_id]