parameters: (client_id: str, client_secret: str,
                                        configs: Configs)
return_statement: return OAuthCredentials(
          access_token=access_token,
          expires_in=expires_in,
          created_time=datetime.now(),
          user_name=configs.CLIENT_CREDENTIALS_USER_NAME,
      )
docstring: Run the OAuth workflow to get credentials for a machine user.
  
      :param client_id: The client_id of the machine user to authenticate as.
      :param client_secret: The client_secret of the machine user to authenticate as.
      :param configs: Configs instance.
      :return: OAuth credentials for the given machine user.
docstring_summary: Run the OAuth workflow to get credentials for a machine user.
docstring_tokens: Run the OAuth workflow to get credentials for a machine user .
function: def get_client_cred_oauth_credentials(client_id: str, client_secret: str,
                                        configs: Configs) -> OAuthCredentials:
      """
      Run the OAuth workflow to get credentials for a machine user.
  
      :param client_id: The client_id of the machine user to authenticate as.
      :param client_secret: The client_secret of the machine user to authenticate as.
      :param configs: Configs instance.
      :return: OAuth credentials for the given machine user.
      """
      client = BackendApplicationClient(client_id=client_id)
      oauth = OAuth2Session(client=client)
      token = oauth.fetch_token(
          token_url=f"https://{configs.AUTH_DOMAIN}/v1/token",
          client_id=client_id,
          client_secret=client_secret,
          scope=configs.CLIENT_CREDENTIALS_SCOPE,
      )
      access_token = token.get("access_token")
      expires_in = token.get("expires_in")
  
      if not access_token or not expires_in:
          raise ValueError("Could not get access token or expires_in data about access token")
  
      return OAuthCredentials(
          access_token=access_token,
          expires_in=expires_in,
          created_time=datetime.now(),
          user_name=configs.CLIENT_CREDENTIALS_USER_NAME,
      )
function_tokens: def get_client_cred_oauth_credentials ( client_id : str , client_secret : str , configs : Configs ) -> OAuthCredentials : client = BackendApplicationClient ( client_id = client_id ) oauth = OAuth2Session ( client = client ) token = oauth . fetch_token ( token_url = f"https://{configs.AUTH_DOMAIN}/v1/token" , client_id = client_id , client_secret = client_secret , scope = configs . CLIENT_CREDENTIALS_SCOPE , ) access_token = token . get ( "access_token" ) expires_in = token . get ( "expires_in" ) if not access_token or not expires_in : raise ValueError ( "Could not get access token or expires_in data about access token" ) return OAuthCredentials ( access_token = access_token , expires_in = expires_in , created_time = datetime . now ( ) , user_name = configs . CLIENT_CREDENTIALS_USER_NAME , )