def _stringify(self, transform: StringifyTransform) -> str:
    res = []
    res.append(transform(self.name))
    if self.final:
        res.append(' final')
    if (len(self.bases) > 0):
        res.append(' : ')
        first = True
        for b in self.bases:
            if (not first):
                res.append(', ')
            first = False
            res.append(transform(b))
    return ''.join(res)
def _stringify(self, transform: StringifyTransform) -> str:
    res = []
    res.append(transform(self.name))
    if self.final:
        res.append(' final')
    if (len(self.bases) > 0):
        res.append(' : ')
        first = True
        for b in self.bases:
            if (not first):
                res.append(', ')
            first = False
            res.append(transform(b))
    return .join(res)