code: def _deepiter_dict(dct):
      """Iterate over all key, value pairs of a (possibly nested) dictionary.
      In this case, all keys of the nested dicts are summarised in a tuple.
  
      Args:
          dct: dict object to iterate.
  
      Yields:
          Tuple of keys (itself a tuple) and the corresponding value.
  
      Examples:
          >>> list(_deepiter_dict({"a": {"b": 1, "c": 2}, "d": 3}))
          [(('a', 'b'), 1), (('a', 'c'), 2), (('d',), 3)]
      """
  
      def chained_keys_iter(prefix_keys, dct_tmp):
          for key, val in dct_tmp.items():
              chained_keys = prefix_keys + (key,)
              if isinstance(val, dict):
                  yield from chained_keys_iter(chained_keys, val)
              else:
                  yield chained_keys, val
  
      yield from chained_keys_iter((), dct)
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: _deepiter_dict(dct) without return types