for part in parts[:-1]:
            if part not in current:
                current[part] = {}
            current = current[part]