def get_text(xmlns, rich_node):
    text_node = rich_node.find(QName(xmlns, 't').text)
    partial_text = text_node.text  or ''

    if text_node.get(QName(NAMESPACES['xml'], 'space').text) != 'preserve':
        partial_text = partial_text.strip()
    return str(partial_text)
Test writing to a bz2.BZ2File file like object
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/reader/strings.py/get_text--crossover with--dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/tests/test_core.py/TestFileFunctions.test_writeto_bzip2_fileobj