title: Python nested dictionary update value where any nested key matches
body: <p>I have a nested dictionary where every element can be of any type including a list or 
  dictionary.
  I'm looking for a method to update any key at any depth with a particular value.
  (So the replacement occurs if the target value is not a list or dictionary)</p>
  
  <p>e.g</p>
  
  <pre><code>{
     'a': 1,
     'b': 2,
     'c': [{'a': 2, 'b': 3}],
     'd': [{'d_d': {'a': 1, 'b': 2}}],
     'e': {'a': 4},
  }
  </code></pre>
  
  <p>would become </p>
  
  <pre><code>{
     'a': 'xx',
     'b': 2,
     'c': [{'a': 'xx', 'b': 3}],
     'd': [{'d_d': {'a': 'xx', 'b': 2}}],
     'e': {'a': 'xx'},
  }
  </code></pre>
  
  <p>where the function takes a dictionary, key and new value like so </p>
  
  <pre><code>update_nested(dict, key='a', value='xx')
  </code></pre>