code: async def populate(self, agent_cls, *args, **kwargs):
          '''Populate all the slave grid environments with agents. Assumes that
          no agents have been spawned yet to the slave environment grids. This
          excludes the slave environment managers as they are not in the grids.)
          '''
          n = self.gs[0] * self.gs[1]
          tasks = []
          for addr in self.addrs:
              task = asyncio.ensure_future(self._populate_slave(addr, agent_cls,
                                                                n, *args,
                                                                **kwargs))
              tasks.append(task)
          rets = await asyncio.gather(*tasks)
          return retync def populate(self, agent_cls, *args, **kwargs):
          '''Populate all the slave grid environments with agents. Assumes that
          no agents have been spawned yet to the slave environment grids. This
          excludes the slave environment managers as they are not in the grids.)
          '''
          n = self.gs[0] * self.gs[1]
          tasks = []
          for addr in self.addrs:
              task = asyncio.ensure_future(self._populate_slave(addr, agent_cls,
                                                                n, *args,
                                                                **kwargs))
              tasks.append(task)
          rets = await asyncio.gather(*tasks)
          return rets
docs: Populate all the slave grid environments with agents. Assumes that
          no agents have been spawned yet to the slave environment grids. This
          excludes the slave environment managers as they are not in the grids.)