code: def env_maker(environment_id, seed, serial_id, monitor=False, allow_early_resets=False):
      
      env = gym.make(environment_id)
      env.seed(seed + serial_id)
  
      # Monitoring the env
      if monitor:
          logdir = logger.get_dir() and os.path.join(logger.get_dir(), str(serial_id))
      else:
          logdir = None
  
      env = Monitor(env, logdir, allow_early_resets=allow_early_resets)
  
      return env
docs: Create a classic control environment with basic set of wrappers