def METHOD_NAME(self, tree):
    acc = bytearray()
    segs = tree.value.lstrip("^\\")
    if len(segs) < len(tree.value):
        acc.extend(bytes(tree.value[:len(tree.value) - len(segs)], "ascii"))
    if segs:
        nr_dots = segs.count(".")
        if nr_dots == 1:
            acc.append(grammar.AML_DUAL_NAME_PREFIX)
        elif nr_dots >= 2:
            acc.append(grammar.AML_MULTI_NAME_PREFIX)
            acc.append(nr_dots + 1)
        acc.extend(bytes(segs.replace(".", ""), "ascii"))
    else:
        acc.append(grammar.AML_NULL_NAME)
    self.acc.append(acc)