'Recursively applies update to all the ancestors of location'

def _update_ancestors(self, location, update):

    parent = self._get_raw_parent_location(as_published(location), ModuleStoreEnum.RevisionOption.draft_preferred)
    if parent:
        self._update_single_item(parent, update)
        self._update_ancestors(parent, update)
