def METHOD_NAME(self, literalNames:list, symbolicNames:list):
    if self.intervals is None:
        return "{}"
    with StringIO() as buf:
        if len(self)>1:
            buf.write("{")
        first = True
        for i in self.intervals:
            for j in i:
                if not first:
                    buf.write(", ")
                buf.write(self.elementName(literalNames, symbolicNames, j))
                first = False
        if len(self)>1:
            buf.write("}")
        return buf.getvalue()