code: def _flatten(self, element):
          
          result = [(element.text or '')]
          if element.attrib.get('alt'):
              result.append(Symbol(element.attrib.get('alt')).textbox)
          for sel in element:
              result.append(self._flatten(sel))
              result.append(sel.tail or '')
  
          # prevent reminder text from getting too close to mana symbols
          return ''.join(result).replace('}(', '} (')
docs: Recursively enter and extract text from all child
          elements.