parameters: (roots, patterns, exclude_patterns=None)
return_statement: return result
docstring: Recursive version of GLOB. Builds the glob of files while
      also searching in the subdirectories of the given roots. An
      optional set of exclusion patterns will filter out the
      matching entries from the result. The exclusions also apply
      to the subdirectory scanning, such that directories that
      match the exclusion patterns will not be searched.
docstring_summary: Recursive version of GLOB. Builds the glob of files while
      also searching in the subdirectories of the given roots. An
      optional set of exclusion patterns will filter out the
      matching entries from the result. The exclusions also apply
      to the subdirectory scanning, such that directories that
      match the exclusion patterns will not be searched.
docstring_tokens: Recursive version of GLOB . Builds the glob of files while also searching in the subdirectories of the given roots . An optional set of exclusion patterns will filter out the matching entries from the result . The exclusions also apply to the subdirectory scanning such that directories that match the exclusion patterns will not be searched .
function: def glob_tree(roots, patterns, exclude_patterns=None):
      """Recursive version of GLOB. Builds the glob of files while
      also searching in the subdirectories of the given roots. An
      optional set of exclusion patterns will filter out the
      matching entries from the result. The exclusions also apply
      to the subdirectory scanning, such that directories that
      match the exclusion patterns will not be searched."""
  
      if not exclude_patterns:
          exclude_patterns = []
  
      result = glob(roots, patterns, exclude_patterns)
      subdirs = [s for s in glob(roots, ["*"]) if s != "." and s != ".." and os.path.isdir(s)]
      if subdirs:
          result.extend(glob_tree(subdirs, patterns, exclude_patterns))
          
      return result
function_tokens: def glob_tree ( roots , patterns , exclude_patterns = None ) : if not exclude_patterns : exclude_patterns = [ ] result = glob ( roots , patterns , exclude_patterns ) subdirs = [ s for s in glob ( roots , [ "*" ] ) if s != "." and s != ".." and os . path . isdir ( s ) ] if subdirs : result . extend ( glob_tree ( subdirs , patterns , exclude_patterns ) ) return result