'Determine if the list is ordered or itemized'

def __determine_list_type(self, chunk):

    lines = chunk.split('\n')
    text_string = ''
    for line in lines:
        if (line[0:5] == 'tx<hx'):
            if (line[17:] == "'B7"):
                return 'unordered'
        elif (line[0:5] == 'tx<nu'):
            text_string += line[17:]
    text_string = text_string.replace('.', '')
    text_string = text_string.replace('(', '')
    text_string = text_string.replace(')', '')
    if text_string.isdigit():
        return 'ordered'
    "\n                                sys.stderr.write('module    is    list_numbers\n')\n                                sys.stderr.write('method    is    __determine    type\n')\n                                sys.stderr.write('Couldn't    get    type    of    list\n')\n                                "
    return 'unordered'
