'Refresh the cached metadata inheritance tree for the org/course combination
for location
If given a runtime, it replaces the cached_metadata in that runtime. NOTE: failure to provide
a runtime may mean that some objects report old values for inherited data.'

def refresh_cached_metadata_inheritance_tree(self, course_id, runtime=None):

    course_id = course_id.for_branch(None)
    if (not self._is_in_bulk_operation(course_id)):
        cached_metadata = self._get_cached_metadata_inheritance_tree(course_id, force_refresh=True)
        if runtime:
            runtime.cached_metadata = cached_metadata
