docs: def add_condition(self, manager, condition_set, field_name, condition, exclude=False, commit=True):
          """
          Adds a new condition and registers it in the global ``gargoyle`` switch manager.
  
          If ``commit`` is ``False``, the data will not be written to the database.
  
          >>> switch = gargoyle['my_switch'] #doctest: +SKIP
          >>> condition_set_id = condition_set.get_id() #doctest: +SKIP
          >>> switch.add_condition(condition_set_id, 'percent', [0, 50], exclude=False) #doctest: +SKIP
          """
          condition_set = manager.get_condition_set_by_id(condition_set)
  
          assert isinstance(condition, basestring), 'conditions must be strings'
  
          namespace = condition_set.get_namespace()
  
          if namespace not in self.value:
              self.value[namespace] = {}
          if field_name not in self.value[namespace]:
              self.value[namespace][field_name] = []
          if condition not in self.value[namespace][field_name]:
              self.value[namespace][field_name].append((exclude and EXCLUDE or INCLUDE, condition))
  
          if commit:
              self.save()