code: def serialize_textbox(ctx, document, txtbox, root):
      
  
      _div = etree.SubElement(root, 'div')
      _div.set('class', 'textbox')
  
      for elem in txtbox.elements:
          _ser = ctx.get_serializer(elem)
  
          if _ser:
              _ser(ctx, document, elem, _div)
  
      fire_hooks(ctx, document, txtbox, _div, ctx.get_hook('textbox'))
  
      return root
docs: Serialize textbox element.