code: def fingerprint2keyid(fingerprint):
      
  
      if gnupg is None:
          return
  
      gpg = gnupg.GPG()
      private_keys = gpg.list_keys(True)
  
      keyid = None
      for private_key in private_keys:
          if private_key['fingerprint'] == config["gpg_key_fingerprint"]:
              keyid = private_key['keyid']
              break
  
      return keyid
docs: Returns keyid from fingerprint for private keys