code: def _asdict(self, *, to_string: bool = False) -> dict:
      res = []
      for key in self._keys:
          value = getattr(self, key)
          if isinstance(value, Struct):
              value = value._asdict(to_string=to_string)
          elif to_string:
              value = str(value)
          res.append((key, value))
  
      return dict(res)
  
file_path: DeepPavlov/deeppavlov/configs/__init__.py
imports: from pathlib import Path
  from typing import Iterator, Dict, Union, Iterable
label_desc: Use image node_id 4 for calling the Struct obj's underlying member method code with example usage: obj._asdict() and returns: dict