code: async def create_datagram_endpoint(self, protocol_factory=None, **kw):
          '''Helper method for creating a connection to an ``address``.
          '''
          protocol_factory = protocol_factory or self.create_protocol
          _, protocol = await self._loop.create_datagram_endpoint(
              protocol_factory, **kw)
          event = protocol.event('connection_made')
          if not event.fired():
              await event.waiter()
          return protocoync def create_datagram_endpoint(self, protocol_factory=None, **kw):
          '''Helper method for creating a connection to an ``address``.
          '''
          protocol_factory = protocol_factory or self.create_protocol
          _, protocol = await self._loop.create_datagram_endpoint(
              protocol_factory, **kw)
          event = protocol.event('connection_made')
          if not event.fired():
              await event.waiter()
          return protocol
docs: Helper method for creating a connection to an ``address``.