def make_env(env_id, rank, seed=0, random_init=True, randomize_sim=True, phantom_sensor=False):

    def _init():
        env = gym.make(env_id)
        env.config(random_init, randomize_sim, phantom_sensor)
        if (rank == 0):
            env.enable_visualization()
            env.enable_print()
        env.seed((seed + rank))
        return env
    return _init
def make_env(env_id, rank, seed=0, random_init=True, randomize_sim=True, phantom_sensor=False):

    def _init():
        env = gym.make(env_id)
        env.config(random_init, randomize_sim, phantom_sensor)
        if (rank == 0):
            env.enable_visualization()
            env.enable_print()
        env.seed((seed + rank))
        return env
    return _init