def write_private_key(self, file_obj, password=None):
raise Exception("<STR_LIT>")<EOL>
Write private key contents into a file (or file-like) object.  If the
password is not ``None``, the key is encrypted before writing.

:param file_obj: the file-like object to write into
:param str password: an optional password to use to encrypt the key

:raises: ``IOError`` -- if there was an error writing to the file
:raises: `.SSHException` -- if the key is invalid