code: def to_dict(self, split_structs_bit=False):
          
          pref_dict = {}
          struct_dict = {}
          for (key, val) in six.iteritems(self):
              if split_structs_bit and isinstance(val, Pref):
                  struct_dict[key] = val
                  continue
              pref_dict[key] = val
          if split_structs_bit:
              return (pref_dict, struct_dict)
          return pref_dict
docs: Converts prefeters to a dictionary.
          Children Pref can be optionally separated