title: Sum two dictionaries with nested dictionaries
body: <p>I have two dictionaries which looks like this:</p>
  <pre class="lang-py prettyprint-override"><code>first_dict = {&quot;key&quot;: {&quot;key&quot;: {&quot;a2&quot;: x, &quot;a3&quot;: y, &quot;key&quot;: {&quot;key&quot;: 1, &quot;key&quot;: 2}}}}
  second_dict = {&quot;key&quot;: {&quot;key&quot;: {&quot;a2&quot;: x, &quot;a3&quot;: y, &quot;key&quot;: {&quot;key&quot;: 3, &quot;key&quot;: 4}}}}
  </code></pre>
  <p>I want to sum those dictionaries, but leave a2 and a3 keys as the are in the final result, so that finals result will look like this:</p>
  <pre class="lang-py prettyprint-override"><code>result_dict = {&quot;key&quot;: {&quot;key&quot;: {&quot;a2&quot;: x, &quot;a3&quot;: y, &quot;key&quot;: {&quot;key&quot;: 4, &quot;key&quot;: 6}}}}
  </code></pre>
  <p>I have a recursive way to sum those dictionaries:</p>
  <pre class="lang-py prettyprint-override"><code>def sum_dicts(first_dict, second_dict):
      if isinstance(first_dict, dict):
          return {k: sum_dicts(first_dict[k], second_dict[k]) for k in first_dict}
  
      return first_dict + second_dict
  </code></pre>
  <p>but I have some trouble to understand how to keep those a2 and a3 keys in final result as they are, since I know their values are equal in both dictionaries [and there is no need to verify that]</p>
  <p>Any help will be appreciated</p>