docs: def GetArtifactsDependenciesClosure(name_list, os_name=None):
    """For all the artifacts in the list returns them and their dependencies."""
  
    artifacts = set(REGISTRY.GetArtifacts(os_name=os_name, name_list=name_list))
  
    dependencies = set()
    for art in artifacts:
      dependencies.update(GetArtifactDependencies(art, recursive=True))
    if dependencies:
      artifacts.update(
          set(
              REGISTRY.GetArtifacts(
                  os_name=os_name, name_list=list(dependencies))))
  
    return artifacts