code: def _collect_internal_deps(self, targets):
      
      roots = set()
      for target in targets:
        roots.update(target.dependencies)
      return Target.closure_for_targets(roots)
docs: Collect one level of dependencies from the given targets, and then transitively walk.
  
      This is different from directly executing `Target.closure_for_targets`, because the
      resulting set will not include the roots unless the roots depend on one another.