<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _collect_internal_deps(self, targets):
 """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. """

    roots = set()
    for target in targets:
      roots.update(target.dependencies)
    return Target.closure_for_targets(roots)