original_docstring: 
          Update two dicts of dicts recursively,
          if either collections.Mapping has leaves that are non-dicts,
          the second's leaf overwrites the first's.
          
docstring: Update two dicts of dicts recursively,
  if either collections.Mapping has leaves that are non-dicts,
  the second's leaf overwrites the first's.
docstring_tokens: Update two dicts of dicts recursively if either collections . Mapping has leaves that are non - dicts the second ' s leaf overwrites the first ' s .
code: def rec_merge(self, d1, d2):
          """
          Update two dicts of dicts recursively,
          if either collections.Mapping has leaves that are non-dicts,
          the second's leaf overwrites the first's.
          """
          # in Python 2, use .iteritems()!
          for k, v in d1.items():
              if k in d2:
                  # this next check is the only difference!
                  if all(isinstance(e, collections.MutableMapping) for e in (v, d2[k])):
                      d2[k] = self.rec_merge(v, d2[k])
                  if isinstance(v, list):
                      d2[k].extend(v)
                  # we could further check types and merge as appropriate here.
          d3 = d1.copy()
          d3.update(d2)
          return d3
code_tokens: def rec_merge ( self , d1 , d2 ) : for k , v in d1 . items ( ) : if k in d2 : if all ( isinstance ( e , collections . MutableMapping ) for e in ( v , d2 [ k ] ) ) : d2 [ k ] = self . rec_merge ( v , d2 [ k ] ) if isinstance ( v , list ) : d2 [ k ] . extend ( v ) d3 = d1 . copy ( ) d3 . update ( d2 ) return d3
short_docstring: Update two dicts of dicts recursively,
  if either collections.Mapping has leaves that are non-dicts,
  the second's leaf overwrites the first's.
short_docstring_tokens: Update two dicts of dicts recursively if either collections . Mapping has leaves that are non - dicts the second ' s leaf overwrites the first ' s .
comment: """
          Update two dicts of dicts recursively,
          if either collections.Mapping has leaves that are non-dicts,
          the second's leaf overwrites the first's.
          """$SEP$# in Python 2, use .iteritems()!$SEP$# this next check is the only difference!$SEP$# we could further check types and merge as appropriate here.