def import_rsa_privatekey_from_file(filepath, password=None,<EOL>scheme='<STR_LIT>', prompt=False):
<EOL>securesystemslib.formats.PATH_SCHEMA.check_match(filepath)<EOL>securesystemslib.formats.RSA_SCHEME_SCHEMA.check_match(scheme)<EOL>if password and prompt:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if password is not None:<EOL><INDENT>securesystemslib.formats.PASSWORD_SCHEMA.check_match(password)<EOL>if not len(password):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>elif prompt:<EOL><INDENT>password = get_password('<STR_LIT>'<EOL>'<STR_LIT>' + Fore.RED + filepath + Fore.RESET + '<STR_LIT>',<EOL>confirm=False) or None<EOL><DEDENT>if password is not None:<EOL><INDENT>securesystemslib.formats.PASSWORD_SCHEMA.check_match(password)<EOL><DEDENT>else:<EOL><INDENT>logger.debug('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>with open(filepath, '<STR_LIT:rb>') as file_object:<EOL><INDENT>pem_key = file_object.read().decode('<STR_LIT:utf-8>')<EOL><DEDENT>rsa_key = securesystemslib.keys.import_rsakey_from_private_pem(pem_key,<EOL>scheme, password)<EOL>return rsa_key<EOL>
<Purpose>
  Import the PEM file in 'filepath' containing the private key.

  If password is passed use passed password for decryption.
  If prompt is True use entered password for decryption.
  If no password is passed and either prompt is False or if the password
  entered at the prompt is an empty string, omit decryption, treating the
  key as if it is not encrypted.
  If password is passed and prompt is True, an error is raised. (See below.)

  The returned key is an object in the
  'securesystemslib.formats.RSAKEY_SCHEMA' format.

<Arguments>
  filepath:
    <filepath> file, an RSA encrypted PEM file.  Unlike the public RSA PEM
    key file, 'filepath' does not have an extension.

  password:
    The passphrase to decrypt 'filepath'.

  scheme:
    The signature scheme used by the imported key.

  prompt:
    If True the user is prompted for a passphrase to decrypt 'filepath'.
    Default is False.

<Exceptions>
  ValueError, if 'password' is passed and 'prompt' is True.

  ValueError, if 'password' is passed and it is an empty string.

  securesystemslib.exceptions.FormatError, if the arguments are improperly
  formatted.

  securesystemslib.exceptions.FormatError, if the entered password is
  improperly formatted.

  IOError, if 'filepath' can't be loaded.

  securesystemslib.exceptions.CryptoError, if a password is available
  and 'filepath' is not a valid key file encrypted using that password.

  securesystemslib.exceptions.CryptoError, if no password is available
  and 'filepath' is not a valid non-encrypted key file.

<Side Effects>
  The contents of 'filepath' are read, optionally decrypted, and returned.

<Returns>
  An RSA key object, conformant to 'securesystemslib.formats.RSAKEY_SCHEMA'.