class_docstr: Class for converting a gym environment, a controller style, and others into a black-box optimization benchmark.
class_docstr_tok: ["Class","for","converting","a","gym","environment",",","a","controller","style",",","and","others","into","a","black-box","optimization","benchmark","."]
code: def get_env_names() -> tp.List[str]:
      # import gym_anm  # noqa
  
      gym_env_names = []
      max_displays = 10
      for e in gym.envs.registry.all():
          try:
              assert not any(
                  x in str(e.id)
                  for x in "Kelly Copy llvm BulletEnv Minitaur Kuka InvertedPendulumSwingupBulletEnv".split()
              )  # We should have another check than that.
              assert (
                  "RacecarZedBulletEnv-v0" != e.id
              ), "This specific environment causes X11 error when using pybullet_envs."
              assert "CarRacing-v" not in str(
                  e.id
              ), "Pixel based task not supported yet"
              env = gym.make(e.id)
              env.reset()
              env.step(env.action_space.sample())
              a1 = np.asarray(env.action_space.sample())
              a2 = np.asarray(env.action_space.sample())
              a3 = np.asarray(env.action_space.sample())
              a1 = a1 + a2 + a3
              if hasattr(a1, "size"):
                  try:
                      assert a1.size < 15000
                  except Exception:  # pylint: disable=broad-except
                      assert a1.size() < 15000  # type: ignore
              gym_env_names.append(e.id)
          except Exception as exception:  # pylint: disable=broad-except
              max_displays -= 1
              if max_displays > 0:
                  print(
                      f"{e.id} not included in full list because of {exception}."
                  )
              if max_displays == 0:
                  print("(similar issue for other environments)")
      return gym_env_names
  
imports: import os
  import copy
  import scipy.stats
  import typing
  import numpy
  import gym
  import nevergrad
  from nevergrad.parametrization import parameter
  from ..base import ExperimentFunction
label_desc: Use image node_id 1 for calling the GymMulti obj's underlying member method code with example usage: obj.get_env_names() and returns: gym_env_names