<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_conditions(self, manager, condition_set, field_name=None, commit=True):
 """ Clears conditions given a set of parameters. If ``commit`` is ``False``, the data will not be written to the database. Clear all conditions given a ConditionSet, and a field name: You can also clear all conditions given a ConditionSet: """

        condition_set = manager.get_condition_set_by_id(condition_set)

        namespace = condition_set.get_namespace()

        if namespace not in self.value:
            return

        if not field_name:
            del self.value[namespace]
        elif field_name not in self.value[namespace]:
            return
        else:
            del self.value[namespace][field_name]

        if commit:
            self.save()