def METHOD_NAME(txt: str) -> Dict[str, Any]:
    def parse_value(s):
        if len(s) == 0:
            return s
        if s[0] == '"':
            return s.strip('"')
        for parser in [int, float]:
            try:
                return parser(s)
            except ValueError:
                pass
        return s
    def tokenize(lines):
        if isinstance(lines, str):
            lines = lines.splitlines()
        for lineno, s in enumerate(lines):
            if len(s) == 0:
                continue
            i = s.find("=")
            if i < 0:
                if s.strip() == "END":
                    break
                raise ValueError("Can not parse:[%d]: %s" % (lineno, s))
            k = s[:i].strip()
            v = s[i + 1 :].strip()
            yield (k, v)
    tree: Dict[str, Any] = {}
    node, name = tree, None
    nodes = []
    for k, v in tokenize(txt):
        if k == "GROUP":
            nodes.append((node, name))
            parent, node, name = node, {}, v
            if name in parent:
                raise ValueError("Repeated key: %s" % name)
            parent[name] = node
        elif k == "END_GROUP":
            if len(nodes) == 0:
                raise ValueError("Bad END_GROUP: too many")
            if name != v:
                raise ValueError("Bad END_GROUP: bad name")
            node, name = nodes.pop()
        else:
            if k in node:
                raise ValueError("Repeated key: %s" % k)
            node[k] = parse_value(v)
    return tree