code: async def connect(self, **kwargs):
          
          kwargs.setdefault('loop', self.loop)
          kwargs.setdefault('max_frame_size', self.max_frame_size)
          kwargs.setdefault('bakery_client', self.bakery_client)
          if 'macaroons' in kwargs:
              if not kwargs['bakery_client']:
                  kwargs['bakery_client'] = httpbakery.Client()
              if not kwargs['bakery_client'].cookies:
                  kwargs['bakery_client'].cookies = GoCookieJar()
              jar = kwargs['bakery_client'].cookies
              for macaroon in kwargs.pop('macaroons'):
                  jar.set_cookie(go_to_py_cookie(macaroon))
          self._connection = await Connection.connect(**kwargs)
docs: Connect to an arbitrary Juju model.
  
          kwargs are passed through to Connection.connect()