class Bundler::Graph

def _populate_relations

def _populate_relations
  parent_dependencies = _groups.values.to_set.flatten
  loop do
    if parent_dependencies.empty?
      break
    else
      tmp = Set.new
      parent_dependencies.each do |dependency|
        # if the dependency is a prerelease, allow to_spec to be non-nil
        dependency.prerelease = true
        child_dependencies = dependency.to_spec.runtime_dependencies.to_set
        @relations[dependency.name] += child_dependencies.map(&:name).to_set
        tmp += child_dependencies
        @node_options[dependency.name] = _make_label(dependency, :node)
        child_dependencies.each do |c_dependency|
          @edge_options["#{dependency.name}_#{c_dependency.name}"] = _make_label(c_dependency, :edge)
        end
      end
      parent_dependencies = tmp
    end
  end
end