<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compile_update_wheres(self, query):
 """ Compile the additional where clauses for updates with joins. :param query: A QueryBuilder instance :type query: QueryBuilder :return: The compiled sql :rtype: str """

        base_where = self._compile_wheres(query)

        if not query.joins:
            return base_where

        join_where = self._compile_update_join_wheres(query)

        if not base_where.strip():
            return "WHERE %s" % self._remove_leading_boolean(join_where)

        return "%s %s" % (base_where, join_where)