nodes: 0, module; 1, function_definition; 2, function_name:key_value_nested_generator; 3, parameters; 4, block; 5, identifier:dict_obj; 6, expression_statement; 7, for_statement; 8, comment:"""Recursively iterate over key-value pairs of nested dictionaries.
  
      Parameters
      ----------
      dict_obj : dict
          The outer-most dict to iterate on.
  
      Returns
      -------
      generator
          A generator over key-value pairs in all nested dictionaries.
  
      Example
      -------
      >>> dicti = {'a': 1, 'b': {'c': 3, 'd': 4}}
      >>> print(sorted(list(key_value_nested_generator(dicti))))
      [('a', 1), ('c', 3), ('d', 4)]
      """; 9, pattern_list; 10, call; 11, block; 12, identifier:key; 13, identifier:value; 14, attribute; 15, argument_list; 16, if_statement; 17, identifier:dict_obj; 18, identifier:items; 19, call; 20, block; 21, else_clause; 22, identifier:isinstance; 23, argument_list; 24, for_statement; 25, block; 26, identifier:value; 27, identifier:dict; 28, pattern_list; 29, call; 30, block; 31, expression_statement; 32, identifier:key; 33, identifier:value; 34, identifier:key_value_nested_generator; 35, argument_list; 36, expression_statement; 37, yield; 38, identifier:value; 39, yield; 40, expression_list; 41, expression_list; 42, identifier:key; 43, identifier:value; 44, identifier:key; 45, identifier:value
code: def key_value_nested_generator(dict_obj):
      """Recursively iterate over key-value pairs of nested dictionaries.
  
      Parameters
      ----------
      dict_obj : dict
          The outer-most dict to iterate on.
  
      Returns
      -------
      generator
          A generator over key-value pairs in all nested dictionaries.
  
      Example
      -------
      >>> dicti = {'a': 1, 'b': {'c': 3, 'd': 4}}
      >>> print(sorted(list(key_value_nested_generator(dicti))))
      [('a', 1), ('c', 3), ('d', 4)]
      """
      for key, value in dict_obj.items():
          if isinstance(value, dict):
              for key, value in key_value_nested_generator(value):
                  yield key, value
          else:
              yield key, value