Create a classic control environment with basic set of wrappers

def env_maker(environment_id, seed, serial_id, monitor=False, allow_early_resets=False):
    """ Create a classic control environment with basic set of wrappers """
    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