code: def key_value_nested_generator(dict_obj):
      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