class_docstr: Binding for py_bullet environments.
docstr: See `Object.__getstate__.
  
  Returns:
      dict: The instance’s __init__() arguments
docstr_tok: ["See","`","Object.__getstate__",".","Returns",":","dict",":","The","instance","\u2019","s","__init__","(",")","arguments"]
code: def __getstate__(self):
      """See `Object.__getstate__.
  
      Returns:
          dict: The instance’s __init__() arguments
  
      """
      env = self._env.env
  
      # Extract constructor signature
      sig = inspect.signature(env.__init__)
      args = {}
      param_names = list(sig.parameters.keys())
  
      # Hard fix for args/private variable name inconsistency
      if (
          "MinitaurBulletEnv" in env.spec.id
          or "MinitaurBulletDuckEnv" in env.spec.id
      ):
          args["render"] = env._is_render
          param_names.remove("render")
      elif any(id in env.spec.id for id in _MJCF_BASED_BULLET_ENVS):
          args["render"] = env.isRender
          if "render" in param_names:
              param_names.remove("render")
          if "robot" in param_names:
              args["robot"] = env.robot
              param_names.remove("robot")
  
      # Create param name -> param value mapping for the wrapped environment
      args = {
          key: env.__dict__["_" + key]
          for key in param_names
          if "_" + key in env.__dict__
      }
  
      # Only one local in-process GUI connection is allowed. Thus pickled
      # BulletEnv shouldn't enable rendering. New BulletEnv will connect in
      # DIRECT mode.
      for key in args.keys():
          if "render" in key:
              args[key] = False
  
      # Add BulletEnv class specific params
      # env id is saved to help gym.make() in __setstate__
      args["id"] = env.spec.id
      args["max_episode_length"] = self._max_episode_length
  
      if "kwargs" in args:
          del args["kwargs"]
  
      return args
  
file_path: garage/src/garage/envs/bullet/bullet_env.py
imports: import inspect
  import gym
  from garage.envs import GymEnv
label_desc: Use image node_id 4 for calling the BulletEnv obj's underlying member method code with example usage: obj.__getstate__() and returns: args