code: def _asdict(trie):
      if not isinstance(trie, defaultdict):
          return trie
      return {k: _asdict(v) for k, v in trie.items()}
  
file_path: gluonts/src/gluonts/core/serde/flat.py
imports: from collections import defaultdict
  from itertools import count
  from typing import Any
  from toolz.dicttoolz import keymap, valmap
  from ._base import encode, Kind, decode
label_desc: Use image node_id 3 for calling a global function with example usage: _asdict(trie) and returns: unknown, trie