code: def _unpack_batch_nested_mapping(
      value, ignore_fields, stop_deep_fields, _parent
  ) -> Dict:
      _dict = {}
      for k, v in value.items():
          _k = _parent + (k,)
          if _k in ignore_fields:
              continue
          if isinstance(v, Mapping) and _k not in stop_deep_fields:
              __dict = _unpack_batch_nested_mapping(
                  v, ignore_fields, stop_deep_fields, _parent=_k
              )
              _dict.update(__dict)
          else:
              _dict[_k] = v
      return _dict
  
file_path: fastNLP/fastNLP/core/collators/packer_unpacker.py
imports: from collections import defaultdict
  from functools import reduce
  from typing import Sequence, Mapping, Dict
label_desc: Use image node_id 1 for calling a global function with example usage: _unpack_batch_nested_mapping(value, ignore_fields, stop_deep_fields, _parent) and returns: _dict