def _create_xblock_ancestor_info(xblock, course_outline):
 ancestors = []
 def collect_ancestor_info(ancestor, include_child_info=False):
  '\n        Collect xblock info regarding the specified xblock and its ancestors.\n        '
  if ancestor:
   direct_children_only = (lambda parent: (parent == ancestor))
   ancestors.append(create_xblock_info(ancestor, include_child_info=include_child_info, course_outline=course_outline, include_children_predicate=direct_children_only))
   collect_ancestor_info(get_parent_xblock(ancestor))
 collect_ancestor_info(get_parent_xblock(xblock), include_child_info=True)
 return {'ancestors': ancestors}

def _create_xblock_ancestor_info ( xblock , course_outline ) : ancestors = [ ] def collect_ancestor_info ( ancestor , include_child_info = False ) : if ancestor : direct_children_only = ( lambda parent : ( parent == ancestor ) ) ancestors . append ( create_xblock_info ( ancestor , include_child_info = include_child_info , course_outline = course_outline , include_children_predicate = direct_children_only ) ) collect_ancestor_info ( get_parent_xblock ( ancestor ) ) collect_ancestor_info ( get_parent_xblock ( xblock ) , include_child_info = True ) return { 'ancestors' : ancestors }
returns information about the ancestors of an xblock .