<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _replace_element_by_own_content(self, element):
 """ Replace the element by own text content. :param element: The element. :type element: hatemile.util.html.htmldomelement.HTMLDOMElement """

        # pylint: disable=no-self-use

        if element.has_children_elements():
            children = element.get_children_elements()
            for child in children:
                element.insert_before(child)
            element.remove_node()
        elif element.has_children():
            element.replace_node(element.get_first_node_child())