code: def rsa_pkcs1v15_sign(private_key, data, hash_algorithm):
      
  
      if private_key.algorithm != 'rsa':
          raise ValueError(pretty_message(
              '''
              The key specified is not an RSA private key, but %s
              ''',
              private_key.algorithm.upper()
          ))
  
      return _sign(private_key, data, hash_algorithm)
docs: Generates an RSASSA-PKCS-v1.5 signature.
  
      When the hash_algorithm is "raw", the operation is identical to RSA
      private key encryption. That is: the data is not hashed and no ASN.1
      structure with an algorithm identifier of the hash algorithm is placed in
      the encrypted byte string.
  
      :param private_key:
          The PrivateKey to generate the signature with
  
      :param data:
          A byte string of the data the signature is for
  
      :param hash_algorithm:
          A unicode string of "md5", "sha1", "sha224", "sha256", "sha384",
          "sha512" or "raw"
  
      :raises:
          ValueError - when any of the parameters contain an invalid value
          TypeError - when any of the parameters are of the wrong type
          OSError - when an error is returned by the OS crypto library
  
      :return:
          A byte string of the signature