def version_history(soup, html_flag=True):
convert = lambda xml_string: xml_to_html(html_flag, xml_string)<EOL>version_history = []<EOL>related_object_tags = raw_parser.related_object(raw_parser.article_meta(soup))<EOL>for tag in related_object_tags:<EOL><INDENT>article_version = OrderedDict()<EOL>date_tag = first(raw_parser.date(tag))<EOL>if date_tag:<EOL><INDENT>copy_attribute(date_tag.attrs, '<STR_LIT>', article_version, '<STR_LIT:version>')<EOL>(day, month, year) = ymd(date_tag)<EOL>article_version['<STR_LIT>'] = day<EOL>article_version['<STR_LIT>'] = month<EOL>article_version['<STR_LIT>'] = year<EOL>article_version['<STR_LIT:date>'] = date_struct_nn(year, month, day)<EOL><DEDENT>copy_attribute(tag.attrs, '<STR_LIT>', article_version, '<STR_LIT>')<EOL>set_if_value(article_version, "<STR_LIT>",<EOL>convert(node_contents_str(first(raw_parser.comment(tag)))))<EOL>version_history.append(article_version)<EOL><DEDENT>return version_history<EOL>
extract the article version history details