docstr: Parse a file with ed25519 private key in OPEN SSH PRIVATE key format.
  :param filepath: file path to a key file
  :param logger: logger to use for messages
  :return: (public key part as bytes, private key part as bytes)
docstr_tok: ["Parse","a","file","with","ed25519","private","key","in","OPEN","SSH","PRIVATE","key","format",".",":","param","filepath",":","file","path","to","a","key","file",":","param","logger",":","logger","to","use","for","messages",":","return",":","(","public","key","part","as","bytes",",","private","key","part","as","bytes",")"]
code: def parse_private_key_file(cls, filepath: str, logger):
      """
      Parse a file with ed25519 private key in OPEN SSH PRIVATE key format.
      :param filepath: file path to a key file
      :param logger: logger to use for messages
      :return: (public key part as bytes, private key part as bytes)
      """
      contents: str = ""
      try:
          with open(filepath, "r") as f:
              contents = f.read()
      except Exception as exc:
          if logger is not None:
              logger.error(
                  "FAILED to read keyfile %s: %s", filepath, exc
              )
          return None, None
      try:
          key_data = pkl.PrivateKeyList.from_string(contents)
          data_public = key_data[0].private.params["public"]
          data_private = key_data[0].private.params["private_public"]
          return data_public, data_private[:32]
      except Exception as exc:
          if logger is not None:
              logger.error(
                  "FAILED to decode keyfile format %s: %s",
                  filepath,
                  exc,
              )
          return None, None
  
imports: import openssh_key.private_key_list
  from openssh_key.key import PublicKey
label_desc: Use image node_id 1 for calling the Ed25519KeyUtil obj's underlying member method code with example usage: obj.parse_private_key_file(cls, filepath, logger) and returns: data_public,  data_private, None,  None, None,  None