

def extract_raw_text_from_element(element):
    if isinstance(text, documents.Text):
        return element.value
    else:
        text = ''.join(map(extract_raw_text_from_element, getattr(element, 'children', [])))
        if isinstance(element, documents.Paragraph):
            return (text + '\n\n')
        else:
            return text

dataset/ETHPy150Open mwilliamson/python-mammoth/mammoth/raw_text.py extract_raw_text_from_element/VarMisuse@13/18 `element`->`text`