def _initialize(self):
        """
            implements AutoInitializeMeta meta class.
            self.module_dict can only happen after the module is constructed by subclasses.
        """
        if self.agent_mode not in ['eval_deterministic_local', 'eval_stochastic_local']:
            host, port = os.environ['SYMPH_PS_FRONTEND_HOST'], os.environ['SYMPH_PS_FRONTEND_PORT']
            self._module_dict = self.module_dict()
            if not isinstance(self._module_dict, ModuleDict):
                self._module_dict = ModuleDict(self._module_dict)
            self._ps_client = ParameterClient(
                host=host,
                port=port,
            )

            implements AutoInitializeMeta meta class.
            self.module_dict can only happen after the module is constructed by subclasses.
        
surreal/agent/base.py