parameters: (feat)
return_statement: return [feat.Document] + list_of_deps[::-1]
docstring: ContainerChain(feat): container path to feat (not including feat itself). 
      Last container directly contains the feature. 
      Example of output:  [<document>,<SuperPart>,<Part>,<Body>]
docstring_summary: ContainerChain(feat): container path to feat (not including feat itself). 
      Last container directly contains the feature. 
      Example of output:  [<document>,<SuperPart>,<Part>,<Body>]
docstring_tokens: ContainerChain ( feat ) : container path to feat ( not including feat itself ) . Last container directly contains the feature . Example of output : [ <document > <SuperPart > <Part > <Body > ]
function: def ContainerChain(feat):
      '''ContainerChain(feat): container path to feat (not including feat itself). 
      Last container directly contains the feature. 
      Example of output:  [<document>,<SuperPart>,<Part>,<Body>]'''
      
      if feat.isDerivedFrom('App::Document'):
          return []
      
      list_traversing_now = [feat]
      set_of_deps = set()
      list_of_deps = []
      
      while len(list_traversing_now) > 0:
          list_to_be_traversed_next = []
          for feat in list_traversing_now:
              for dep in feat.InList:
                  if isAContainer(dep) and Container(dep).hasObject(feat):
                      if not (dep in set_of_deps):
                          set_of_deps.add(dep)
                          list_of_deps.append(dep)
                          list_to_be_traversed_next.append(dep)
          if len(list_to_be_traversed_next) > 1:
              raise ContainerTreeError("Container tree is not a tree")
          list_traversing_now = list_to_be_traversed_next
      
      return [feat.Document] + list_of_deps[::-1]
function_tokens: def ContainerChain ( feat ) : if feat . isDerivedFrom ( 'App::Document' ) : return [ ] list_traversing_now = [ feat ] set_of_deps = set ( ) list_of_deps = [ ] while len ( list_traversing_now ) > 0 : list_to_be_traversed_next = [ ] for feat in list_traversing_now : for dep in feat . InList : if isAContainer ( dep ) and Container ( dep ) . hasObject ( feat ) : if not ( dep in set_of_deps ) : set_of_deps . add ( dep ) list_of_deps . append ( dep ) list_to_be_traversed_next . append ( dep ) if len ( list_to_be_traversed_next ) > 1 : raise ContainerTreeError ( "Container tree is not a tree" ) list_traversing_now = list_to_be_traversed_next return [ feat . Document ] + list_of_deps [ : : - 1 ]