class Bundler::Graph

def _make_label(symbol_or_string_or_dependency, element_type)

def _make_label(symbol_or_string_or_dependency, element_type)
  case element_type.to_sym
  when :node
    if symbol_or_string_or_dependency.is_a?(Gem::Dependency)
      label = symbol_or_string_or_dependency.name.dup
      label << "\n#{symbol_or_string_or_dependency.to_spec.version}" if @show_version
    else
      label = symbol_or_string_or_dependency.to_s
    end
  when :edge
    label = nil
    if symbol_or_string_or_dependency.respond_to?(:requirements_list) && @show_requirements
      tmp = symbol_or_string_or_dependency.requirements_list.join(", ")
      label = tmp if tmp != ">= 0"
    end
  else
    raise ArgumentError, "2nd argument is invalid"
  end
  label.nil? ? {} : { :label => label }
end