<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def restart(self, timeout=300, config_callback=None):
 """Restart each member of the replica set."""

        for member_id in self.server_map:
            host = self.server_map[member_id]
            server_id = self._servers.host_to_server_id(host)
            server = self._servers._storage[server_id]
            server.restart(timeout, config_callback)
        self.waiting_member_state()