def transform_content(tags, content_transformer):
if type(tags) not in [tuple, list]:<EOL><INDENT>tags = [tags]<EOL><DEDENT>for tag in tags:<EOL><INDENT>new_child = dhtmlparser.HTMLElement(content_transformer(tag))<EOL>if hasattr(tag, "<STR_LIT>"):<EOL><INDENT>new_child.parent = tag<EOL><DEDENT>tag.childs = [new_child]<EOL><DEDENT>
Transform content in all `tags` using result of `content_transformer(tag)`
call.

Args:
    tags (obj/list): HTMLElement instance, or list of HTMLElement
                     instances.
    content_transformer (function): Function which is called as
                                    ``content_transformer(tag)``.