code: def addresses_for_key(gpg, key):
      
      fingerprint = key["fingerprint"]
      addresses = []
      for key in gpg.list_keys():
          if key["fingerprint"] == fingerprint:
              addresses.extend([address.split("<")[-1].strip(">")
                                for address in key["uids"] if address])
      return addresses
docs: Takes a key and extracts the email addresses for it.