code: def ng_full_gym(
      seed: tp.Optional[int] = None,
      randomized: bool = True,
      multi: bool = False,
      big: bool = False,
      memory: bool = False,
      ng_gym: bool = False,  # pylint: disable=redefined-outer-name
      conformant: bool = False,
      gp: bool = False,
      sparse: bool = False,
      multi_scale: bool = False,
  ) -> tp.Iterator[Experiment]:
      """Gym simulator. Maximize reward.  Many distinct problems.
  
      Parameters:
          seed: int
             random seed.
          randomized: bool
             whether we keep the problem's stochasticity
          multi: bool
             do we have one neural net per time step
          big: bool
             do we consider big budgets
          memory: bool
             do we use recurrent nets
          ng_gym: bool
             do we restrict to ng-gym
          conformant: bool
             do we restrict to conformant planning, i.e. deterministic controls.
      """
      env_names = nevergrad_gym.GymMulti.get_env_names()
      assert (
          int(ng_gym) + int(gp) <= 1
      ), "At most one specific list of environments."
      if ng_gym:
          env_names = nevergrad_gym.GymMulti.ng_gym
      if gp:
          import pybullet_envs  # pylint: disable=unused-import
  
          env_names = [
              "CartPole-v1",
              "Acrobot-v1",
              "MountainCarContinuous-v0",
              "Pendulum-v1",
              # "InvertedPendulumSwingupBulletEnv-v0",
              "BipedalWalker-v3",
              "BipedalWalkerHardcore-v3",
              "HopperBulletEnv-v0",
              # "InvertedDoublePendulumBulletEnv-v0",
              "LunarLanderContinuous-v2",
          ]
  
      seedg = create_seed_generator(seed)
      optims = [
          "DiagonalCMA",
          "GeneticDE",
          "NoisyRL1",
          "NoisyRL2",
          "NoisyRL3",
          "MixDeterministicRL",
          "SpecialRL",
          "PSO",
      ]
      if multi:
          controls = ["multi_neural"]
      else:
          controls = (
              [
                  "noisy_semideep_neural",
                  "noisy_scrambled_semideep_neural",  # Scrambling: why not perturbating the order of variables ?
                  "noisy_deep_neural",
                  "noisy_scrambled_deep_neural",
                  "neural",
                  # "structured_neural",
                  # "memory_neural",
                  "stackingmemory_neural",
                  "deep_neural",
                  "semideep_neural",
                  "noisy_neural",
                  "noisy_scrambled_neural",
                  # "scrambled_neural",
                  # "linear",
                  "resid_neural",
                  "resid_semideep_neural",
                  "resid_deep_neural",
              ]
              if not big
              else ["resid_neural"]
          )
      if memory:
          controls = [
              "stackingmemory_neural",
              "deep_stackingmemory_neural",
              "semideep_stackingmemory_neural",
          ]
          controls += [
              "memory_neural",
              "deep_memory_neural",
              "semideep_memory_neural",
          ]
          controls += [
              "extrapolatestackingmemory_neural",
              "deep_extrapolatestackingmemory_neural",
              "semideep_extrapolatestackingmemory_neural",
          ]
          assert not multi
      if conformant:
          controls = ["stochastic_conformant"]
      optimization_scales: tp.List[int] = [0]
      if multi_scale:
          optimization_scales = [-6, -4, -2, 0]
      budgets = [50, 200, 100, 25, 400]  # Let's go with low budget.
      budgets = gym_budget_modifier(budgets)
      for control in controls:
          neural_factors: tp.Any = (
              [None]
              if (conformant or control == "linear")
              else (
                  [1]
                  if "memory" in control
                  else ([3] if big else [1, 2, 3])
              )
          )
          for neural_factor in neural_factors:
              for name in env_names:
                  sparse_limits: tp.List[tp.Optional[int]] = [None]
                  if sparse:
                      sparse_limits += [10, 100, 1000]
                  for sparse_limit in sparse_limits:
                      for optimization_scale in optimization_scales:
                          try:
                              func = nevergrad_gym.GymMulti(
                                  name,
                                  control=control,
                                  neural_factor=neural_factor,
                                  randomized=randomized,
                                  optimization_scale=optimization_scale,
                                  sparse_limit=sparse_limit,
                              )
                          except MemoryError:
                              continue
                          for budget in budgets:
                              for algo in optims:
                                  xp = Experiment(
                                      func,
                                      algo,
                                      budget,
                                      num_workers=1,
                                      seed=next(seedg),
                                  )
                                  if not xp.is_incoherent:
                                      yield xp
  
imports: import os
  import typing
  from nevergrad.functions import gym
  from .xpbase import registry
  from .xpbase import create_seed_generator
  from .xpbase import Experiment
  from .optgroups import get_optimizers
label_desc: Use image node_id 4 for calling a global function with example usage: ng_full_gym(seed, randomized, multi, big, memory, ng_gym, conformant, gp, sparse, multi_scale) without return types