def METHOD_NAME(self) -> Cursor:
    if self._cursor is None:
        headers = (
            {trino.constants.HEADER_EXTRA_CREDENTIAL: self.extra_credential}
            if self.extra_credential
            else {}
        )
        self._cursor = trino.dbapi.connect(
            host=self.host,
            port=self.port,
            user=self.user,
            catalog=self.catalog,
            auth=self.auth,
            http_scheme=self.http_scheme,
            source=self.source,
            http_headers=headers,
        ).cursor()
    return self._cursor