import re
from lxml import etree


def new_ele(tag, attrs={}, **extra):
    etree.Element(tag, attrs, **extra)


def sub_ele(parent, tag, attrs={}, **extra):
    etree.SubElement(parent, tag, attrs, **extra)

# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')

@@ -6,206 +6,8 @@
 t re
-%0Afrom lxml import etree%0A%0A%0Adef new_ele(tag, attrs=%7B%7D, **extra):%0A    etree.Element(tag, attrs, **extra)%0A%0A%0Adef sub_ele(parent, tag, attrs=%7B%7D, **extra):%0A    etree.SubElement(parent, tag, attrs, **extra)
 %0A%0A# 

Remove new_ele() and sub_ele() functions