code: def sign_hash(private_key, hash, hash_algo):
      
      hash_algo = _hash_algorithms[hash_algo]
      return get_privatekey(private_key).sign(
          hash,
          padding.PKCS1v15(),
          utils.Prehashed(hash_algo),
      )
docs: Sign the given hash with the given private key.
  
      Args:
          private_key (str): PEM enoded private key
          hash (byte str): hash to sign
          hash_algo (str): name of hash algorithm used
  
      Returns:
          byte string representing the signature