def double_linked_dom(str_or_dom):
dom = str_or_dom<EOL>if not isinstance(str_or_dom, dhtmlparser.HTMLElement):<EOL><INDENT>dom = dhtmlparser.parseString(str_or_dom)<EOL><DEDENT>dhtmlparser.makeDoubleLinked(dom)<EOL>return dom<EOL>
Create double linked DOM from input.

In case of string, parse it, make it double-linked. In case of DOM, just
make it double-linked.

Args:
    str_or_dom (str/HTMLelement): String or HTMLelement instance.

Returns:
    obj: HTMLelement with parsed, double-linked content from `str_or_dom`.