def _stringify(self, transform: StringifyTransform) -> str:
    res = []
    if self.rooted:
        res.append('')
    for i in range(len(self.names)):
        n = self.names[i]
        t = self.templates[i]
        if t:
            res.append(('template ' + transform(n)))
        else:
            res.append(transform(n))
    return '::'.join(res)
def _stringify(self, transform: StringifyTransform) -> str:
    res = []
    if self.rooted:
        res.append()
    for i in range(len(self.names)):
        n = self.names[i]
        t = self.templates[i]
        if t:
            res.append(('template ' + transform(n)))
        else:
            res.append(transform(n))
    return '::'.join(res)