parameters: (path, dir_filter=None)
return_statement: return dirs
docstring: Return the list of all directories under the given path in
          topdown order.
  
          Args:
              dir_filter: if not None, the filter will be invoked
                  with the filesystem object and the path of each dirfound.
                  The dir is included in the result if the callback returns True.
docstring_summary: Return the list of all directories under the given path in
          topdown order.
docstring_tokens: Return the list of all directories under the given path in topdown order .
function: def dirs_under(path, dir_filter=None):
          """Return the list of all directories under the given path in
          topdown order.
  
          Args:
              dir_filter: if not None, the filter will be invoked
                  with the filesystem object and the path of each dirfound.
                  The dir is included in the result if the callback returns True.
          """
          def filter_all(dirpath):
              return True
          dir_filter = dir_filter or filter_all
  
          dirs = []
          for (dirpath, dirnames, filenames) in os.walk(path):
              if dir_filter(dirpath):
                  dirs.append(dirpath)
          return dirs
function_tokens: def dirs_under ( path , dir_filter = None ) : def filter_all ( dirpath ) : return True dir_filter = dir_filter or filter_all dirs = [ ] for ( dirpath , dirnames , filenames ) in os . walk ( path ) : if dir_filter ( dirpath ) : dirs . append ( dirpath ) return dirs