def tag_to_dict(html):
element = document_fromstring(html).xpath("<STR_LIT>")[<NUM_LIT:0>]<EOL>attributes = dict(element.attrib)<EOL>attributes["<STR_LIT:text>"] = element.text_content()<EOL>return attributes<EOL>
Extract tag's attributes into a `dict`.