<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def connect_to_endpoints(self, *endpoints: ConnectionConfig) -> None: """ Connect to the given endpoints and await until all connections are established. """

        self._throw_if_already_connected(*endpoints)
        await asyncio.gather(
            *(self._await_connect_to_endpoint(endpoint) for endpoint in endpoints),
            loop=self.event_loop
        )