@staticmethod<EOL><INDENT>def format_private_key(key, heads=True):<DEDENT>
private_key = key.replace('<STR_LIT>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT:\r>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT:\n>', '<STR_LIT>')<EOL>if len(private_key) > <NUM_LIT:0>:<EOL><INDENT>if private_key.find('<STR_LIT>') != -<NUM_LIT:1>:<EOL><INDENT>private_key = private_key.replace('<STR_LIT>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT:U+0020>', '<STR_LIT>')<EOL>if heads:<EOL><INDENT>private_key = "<STR_LIT>" + "<STR_LIT:\n>".join(wrap(private_key, <NUM_LIT:64>)) + "<STR_LIT>"<EOL><DEDENT><DEDENT>else:<EOL><INDENT>private_key = private_key.replace('<STR_LIT>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT>', '<STR_LIT>')<EOL>private_key = private_key.replace('<STR_LIT:U+0020>', '<STR_LIT>')<EOL>if heads:<EOL><INDENT>private_key = "<STR_LIT>" + "<STR_LIT:\n>".join(wrap(private_key, <NUM_LIT:64>)) + "<STR_LIT>"<EOL><DEDENT><DEDENT><DEDENT>return private_key<EOL>
Returns a private key (adding header & footer if required).

:param key A private key
:type: string

:param heads: True if we want to include head and footer
:type: boolean

:returns: Formated private key
:rtype: string