class_docstr: Creates and signs a JWT with the specified private key file, username, and account identifier.
  
  The JWTGenerator keeps the generated token and only regenerates the token if a specified period
  of time has passed.
  
  Creates an object that generates JWTs for the specified user, account identifier, and private key
  
  :param account: Your Snowflake account identifier.
      See https://docs.snowflake.com/en/user-guide/admin-account-identifier.html. Note that if you are using
      the account locator, exclude any region information from the account locator.
  :param user: The Snowflake username.
  :param private_key: Private key from the file path for signing the JWTs.
  :param lifetime: The number of minutes (as a timedelta) during which the key will be valid.
  :param renewal_delay: The number of minutes (as a timedelta) from now after which the JWT
      generator should renew the JWT.
class_docstr_tok: ["Creates","and","signs","a","JWT","with","the","specified","private","key","file",",","username",",","and","account","identifier",".","The","JWTGenerator","keeps","the","generated","token","and","only","regenerates","the","token","if","a","specified","period","of","time","has","passed",".","Creates","an","object","that","generates","JWTs","for","the","specified","user",",","account","identifier",",","and","private","key",":","param","account",":","Your","Snowflake","account","identifier",".","See","https",":","\/\/docs.snowflake.com\/en\/user-guide\/admin-account-identifier.html",".","Note","that","if","you","are","using","the","account","locator",",","exclude","any","region","information","from","the","account","locator",".",":","param","user",":","The","Snowflake","username",".",":","param","private_key",":","Private","key","from","the","file","path","for","signing","the","JWTs",".",":","param","lifetime",":","The","number","of","minutes","(","as","a","timedelta",")","during","which","the","key","will","be","valid",".",":","param","renewal_delay",":","The","number","of","minutes","(","as","a","timedelta",")","from","now","after","which","the","JWT","generator","should","renew","the","JWT","."]
docstr: Prepare the account identifier for use in the JWT.
  
  For the JWT, the account identifier must not include the subdomain or any region or cloud provider
  information.
  
  :param raw_account: The specified account identifier.
docstr_tok: ["Prepare","the","account","identifier","for","use","in","the","JWT",".","For","the","JWT",",","the","account","identifier","must","not","include","the","subdomain","or","any","region","or","cloud","provider","information",".",":","param","raw_account",":","The","specified","account","identifier","."]
code: def prepare_account_name_for_jwt(self, raw_account: str) -> str:
      """
      Prepare the account identifier for use in the JWT.
  
      For the JWT, the account identifier must not include the subdomain or any region or cloud provider
      information.
  
      :param raw_account: The specified account identifier.
      """
      account = raw_account
      if ".global" not in account:
          # Handle the general case.
          account = account.partition(".")[0]
      else:
          # Handle the replication case.
          account = account.partition("-")[0]
      # Use uppercase for the account identifier.
      return account.upper()
  
file_path: airflow/airflow/providers/snowflake/utils/sql_api_generate_jwt.py
imports: from __future__ import annotations
  import base64
  import hashlib
  import logging
  from datetime import datetime, timedelta, timezone
  from typing import Any
  import jwt
  from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
label_desc: Use image node_id 2 for calling the JWTGenerator obj's underlying member method code with example usage: obj.prepare_account_name_for_jwt(raw_account) and returns: account