code: def _convert_connected_app(self):
          
          if self.services and "connected_app" in self.services:
              # already a service
              return
          connected_app = self.get_connected_app()
          if not connected_app:
              # not configured
              return
          self.logger.warning(
              "Reading Connected App info from deprecated config."
              " Connected App should be changed to a service."
              " If using environment keychain, update the environment variable."
              " Otherwise, it has been handled automatically and you should not"
              " see this message again."
          )
          ca_config = ServiceConfig(
              {
                  "callback_url": connected_app.callback_url,
                  "client_id": connected_app.client_id,
                  "client_secret": connected_app.client_secret,
              }
          )
          self.set_service("connected_app", ca_config)
docs: Convert Connected App to service