<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _merge_buckets(self, bucket_list: Set[DependenceBucket]) -> DependenceBucket: """ Merges the buckets in bucket list """

        variables = []  # type: List[str]
        conditions = []  # type: List[z3.BoolRef]
        for bucket in bucket_list:
            self.buckets.remove(bucket)
            variables += bucket.variables
            conditions += bucket.conditions

        new_bucket = DependenceBucket(variables, conditions)
        self.buckets.append(new_bucket)

        return new_bucket