code: def add_dict(self, dyn_dict):
          'Adds a dictionary to the prefs'
          if not isinstance(dyn_dict, dict):
              raise Exception('DynStruct.add_dict expects a dictionary.' +
                              'Recieved: ' + six.text_type(type(dyn_dict)))
          for (key, val) in six.iteritems(dyn_dict):
              self[key] = vaf add_dict(self, dyn_dict):
          'Adds a dictionary to the prefs'
          if not isinstance(dyn_dict, dict):
              raise Exception('DynStruct.add_dict expects a dictionary.' +
                              'Recieved: ' + six.text_type(type(dyn_dict)))
          for (key, val) in six.iteritems(dyn_dict):
              self[key] = val
docs: Adds a dictionary to the prefs