#NEWLINE# def _parse_pem_key( raw_key_input ) : #NEWLINE# #INDENT# 'Identify and extract PEM keys.\n\n    Determines whether the given key is in the format of PEM key, and extracts\n    the relevant part of the key if it is.\n\n    Args:\n        raw_key_input: The contents of a private key file (either PEM or\n                       PKCS12).\n\n    Returns:\n        string, The actual key if the contents are from a PEM file, or\n        else None.\n    ' #NEWLINE# offset = raw_key_input . find ( b'-----BEGIN ' ) #NEWLINE# if ( offset != ( - 1 ) ) : #NEWLINE# #INDENT# return raw_key_input [ offset : ]