code: def decrypt_key(key, password):
      
      private = serialization.load_pem_private_key(key, password=password, backend=default_backend())
      return private.private_bytes(Encoding.PEM, PrivateFormat.PKCS8, NoEncryption())
docs: Decrypt an encrypted private key.
  
      :param key: Encrypted private key as a string.
      :param password: Key pass-phrase.
      :return: Decrypted private key as a string.