def parse_profile_from_hcard(hcard: str, handle: str):
from federation.entities.diaspora.entities import DiasporaProfile  <EOL>doc = html.fromstring(hcard)<EOL>profile = DiasporaProfile(<EOL>name=_get_element_text_or_none(doc, "<STR_LIT>"),<EOL>image_urls={<EOL>"<STR_LIT>": _get_element_attr_or_none(doc, "<STR_LIT>", "<STR_LIT:src>"),<EOL>"<STR_LIT>": _get_element_attr_or_none(doc, "<STR_LIT>", "<STR_LIT:src>"),<EOL>"<STR_LIT>": _get_element_attr_or_none(doc, "<STR_LIT>", "<STR_LIT:src>"),<EOL>},<EOL>public=True if _get_element_text_or_none(doc, "<STR_LIT>") == "<STR_LIT:true>" else False,<EOL>id=handle,<EOL>handle=handle,<EOL>guid=_get_element_text_or_none(doc, "<STR_LIT>"),<EOL>public_key=_get_element_text_or_none(doc, "<STR_LIT>"),<EOL>)<EOL>return profile<EOL>
Parse all the fields we can from a hCard document to get a Profile.

:arg hcard: HTML hcard document (str)
:arg handle: User handle in username@domain.tld format
:returns: ``federation.entities.diaspora.entities.DiasporaProfile`` instance