code: def load_private_key(key_file, key_password=None):
      
      key_file = os.path.expanduser(key_file)
      key_file = os.path.abspath(key_file)
  
      if not key_password:
          with open(key_file, 'r') as key:
              return key.read()
  
      with open(key_file, 'rb') as key:
          key_bytes = key.read()
      return decrypt_key(key_bytes, key_password).decode(ENCODING)
docs: Load a private key from disk.
  
      :param key_file: File path to key file.
      :param key_password: Optional. If the key file is encrypted, provide the password to decrypt it. Defaults to None.
      :return: PrivateKey<string>