docs: def unbunchify(x):
      """ Recursively converts a Bunch into a dictionary.
          
          >>> b = Bunch(foo=Bunch(lol=True), hello=42, ponies='are pretty!')
          >>> unbunchify(b)
          {'ponies': 'are pretty!', 'foo': {'lol': True}, 'hello': 42}
          
          unbunchify will handle intermediary dicts, lists and tuples (as well as
          their subclasses), but ymmv on custom datatypes.
          
          >>> b = Bunch(foo=['bar', Bunch(lol=True)], hello=42, 
          ...         ponies=('are pretty!', Bunch(lies='are trouble!')))
          >>> unbunchify(b) #doctest: +NORMALIZE_WHITESPACE
          {'ponies': ('are pretty!', {'lies': 'are trouble!'}), 
           'foo': ['bar', {'lol': True}], 'hello': 42}
          
          nb. As dicts are not hashable, they cannot be nested in sets/frozensets.
      """
      if isinstance(x, dict):
          return dict( (k, unbunchify(v)) for k,v in iteritems(x) )
      elif isinstance(x, (list, tuple)):
          return type(x)( unbunchify(v) for v in x )
      else:
          return x