def boxed_text_to_image_block(tag):
tag_block = OrderedDict()<EOL>image_content = body_block_image_content(first(raw_parser.inline_graphic(tag)))<EOL>tag_block["<STR_LIT:type>"] = "<STR_LIT:image>"<EOL>set_if_value(tag_block, "<STR_LIT>", doi_uri_to_doi(object_id_doi(tag, tag.name)))<EOL>set_if_value(tag_block, "<STR_LIT:id>", tag.get("<STR_LIT:id>"))<EOL>set_if_value(tag_block, "<STR_LIT:image>", image_content)<EOL>p_tags = raw_parser.paragraph(tag)<EOL>caption_content = []<EOL>for p_tag in p_tags:<EOL><INDENT>if not raw_parser.inline_graphic(p_tag):<EOL><INDENT>caption_content.append(body_block_content(p_tag))<EOL><DEDENT><DEDENT>set_if_value(tag_block, "<STR_LIT>", caption_content)<EOL>return tag_block<EOL>
covert boxed-text to an image block containing an inline-graphic