Return an element loaded from the XML in the template file identified by
    *template_name*.

def parse_from_template(template_name):
    """
    Return an element loaded from the XML in the template file identified by
    *template_name*.
    """
    thisdir = os.path.split(__file__)[0]
    filename = os.path.join(
        thisdir, '..', 'templates', '%s.xml' % template_name
    )
    with open(filename, 'rb') as f:
        xml = f.read()
    return parse_xml(xml)