def create_connection(self, alias: str = "default", **kwargs: Any) -> _T:
        """
        Construct an instance of ``elasticsearch.Elasticsearch`` and register
        it under given alias.
        """
        kwargs.setdefault("serializer", serializer)
        conn = self._conns[alias] = self.elasticsearch_class(**kwargs)
        return self._with_user_agent(conn)

        Construct an instance of ``elasticsearch.Elasticsearch`` and register
        it under given alias.
        
elasticsearch/dsl/connections.py