def resource_etree_element(self, resource, element_name='url'):
        e = Element(element_name)
        sub = Element('loc')
        sub.text=resource.uri
        e.append(sub)
        if (resource.timestamp is not None):
            # Create appriate element for timestamp
            sub = Element('lastmod')
            sub.text = str(resource.lastmod) #W3C Datetime in UTC
            e.append(sub)
        md_atts = {}
        for att in ('capability','change','hash','length','path','mime_type',
                    'md_at','md_completed','md_from','md_until'):
            val = getattr(resource,att,None)
            if (val is not None):
                md_atts[self._xml_att_name(att)] = str(val)
        if (len(md_atts)>0):
            md = Element('rs:md',md_atts)
            e.append(md)
        # add any <rs:ln>
        if (hasattr(resource,'ln') and
            resource.ln is not None):
            for ln in resource.ln:
                self.add_element_with_atts_to_etree(e,'rs:ln',ln)
        if (self.pretty_xml):
            e.tail="\n"
        return(e)
Completer produces zsh shell-code that produces no completion matches.
dataset/ETHPy150Open resync/resync/resync/sitemap.py/Sitemap.resource_etree_element--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_usage.py/ZshCompleterTestCase.test_completer