code: def test_pickle_creates_new_server(env_ids):
      """Test pickling a Bullet environment creates a new connection.
  
      If all pickling create new connections, no repetition of client id
      should be found.
      """
      n_env = 4
      for env_id in env_ids:
          # extract id string
          env_id = env_id.replace("- ", "")
          bullet_env = BulletEnv(env_id)
          envs = [
              pickle.loads(pickle.dumps(bullet_env))
              for _ in range(n_env)
          ]
          id_set = set()
  
          if hasattr(bullet_env._env, "_pybullet_client"):
              id_set.add(bullet_env._env._pybullet_client._client)
              for e in envs:
                  new_id = e._env._pybullet_client._client
                  assert new_id not in id_set
                  id_set.add(new_id)
          elif hasattr(bullet_env._env, "_p"):
              if isinstance(bullet_env._env._p, BulletClient):
                  id_set.add(bullet_env._env._p._client)
                  for e in envs:
                      new_id = e._env._p._client
                      assert new_id not in id_set
                      id_set.add(new_id)
              else:
                  # Some environments have _p as the pybullet module, and they
                  # don't store client id, so can't check here
                  pass
  
          for env in envs:
              env.close()
  
file_path: garage/tests/garage/envs/bullet/test_bullet_env.py
imports: import pickle
  import pybullet_envs
  from pybullet_utils.bullet_client import BulletClient
  import pytest
  from garage.envs.bullet import BulletEnv
  from tests.helpers import step_env
label_desc: Use image node_id 3 for calling a global function with example usage: test_pickle_creates_new_server(env_ids) without return types