<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_all_assignments(semester=None, pool=None, shifts=None):
 """ Clears all regular workshift assignments. Parameters semester : workshift.models.Semester, optional pool : workshift.models.WorkshiftPool, optional If set, grab workshifts from a specific pool. Otherwise, the primary workshift pool will be used. shifts : list of workshift.models.RegularWorkshift, optional """

    if semester is None:
        try:
            semester = Semester.objects.get(current=True)
        except (Semester.DoesNotExist, Semester.MultipleObjectsReturned):
            return []
    if pool is None:
        pool = WorkshiftPool.objects.get(
            semester=semester,
            is_primary=True,
        )
    if shifts is None:
        shifts = RegularWorkshift.objects.filter(
            pool=pool,
            is_manager_shift=False,
            workshift_type__assignment=WorkshiftType.AUTO_ASSIGN,
        )

    for shift in shifts:
        shift.current_assignees.clear()