docs: def get_api_client(cls):
      """Get an API client (with configuration)."""
      config = cloudsmith_api.Configuration()
      client = cls()
      client.config = config
      client.api_client.rest_client = RestClient()
  
      user_agent = getattr(config, "user_agent", None)
      if user_agent:
          client.api_client.user_agent = user_agent
  
      headers = getattr(config, "headers", None)
      if headers:
          for k, v in six.iteritems(headers):
              client.api_client.set_default_header(k, v)
  
      return client