def setup(self, argv):
        """
        The function name must be `generate`.
        Will be called by `surreal.main_scripts.runner`
        """
        parser = argparse.ArgumentParser()
        parser.add_argument('--env', type=str, required=True, help='name of the environment')
        parser.add_argument('--num-agents', type=int, required=True, help='number of agents used')
        parser.add_argument('--num-gpus', type=int, default=0,
                            help='number of GPUs to use, 0 for CPU only.')
        parser.add_argument('--agent-num-gpus', type=int, default=0,
                            help='number of GPUs to use for agent, 0 for CPU only.')
        parser.add_argument('--restore-folder', type=str, default=None,
                            help='folder containing checkpoint to restore from')
        parser.add_argument('--experiment-folder', required=True,
                            help='session_config.folder that has experiment files'
                            ' like checkpoint and logs')
        parser.add_argument('--agent-batch', type=int, default=1,
                            help='how many agents/evals per batch')
        parser.add_argument('--eval-batch', type=int, default=1,
                            help='how many agents/evals per batch')
        parser.add_argument('--unit-test', action='store_true',
                            help='Prevents sharding replay and paramter '
                            'server. Helps prevent address collision'
                            ' in unit testing.')

        args = parser.parse_args(args=argv)

        self.env_config.env_name = args.env
        self.env_config = make_env_config(self.env_config)
        self.env_config.num_agents = args.num_agents

        self.session_config.folder = args.experiment_folder
        self.session_config.agent.num_gpus = args.agent_num_gpus
        self.session_config.learner.num_gpus = args.num_gpus
        if args.restore_folder is not None:
            self.session_config.checkpoint.restore = True
            self.session_config.checkpoint.restore_folder = args.restore_folder
        self.agent_batch_size = args.agent_batch
        self.eval_batch_size = args.eval_batch

        # Used in tests: Prevent IP address in use error
        #                Prevent replay from hanging learner
        #                due to sample_start
        if args.unit_test:
            self.learner_config.replay.sampling_start_size = 5
            self.learner_config.replay.replay_shards = 1
            self.session_config.ps.shards = 1

        The function name must be `generate`.
        Will be called by `surreal.main_scripts.runner`
        
surreal/main/ddpg_configs.py