You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mappers.rb
    path of file: ./repos/vagrant/plugins/commands/serve/mappers/internal/graph
    
    the code of the file until where you have to start completion: # Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

module VagrantPlugins
  module CommandServe
    class Mappers
      module Internal
        class Graph
          # Represent given mappers and inputs as
          # graph.
          class Mappers
            include Util::HasLogger
            # Weight given to root vertex
            ROOT_WEIGHT = 0
            # Weight given to source vertex or initial value
            SOURCE_WEIGHT = 0
            # Weight given to the destination vertex
            FINAL_WEIGHT = 0
            # Weight given to output types matching final
            DST_WEIGHT = 0
            # Weight given to named input value vertices
            
    
            def setup!
              @graph = Graph.new
              # Create a root vertex to provide a single starting point
              @root = graph.add_vertex(Graph::Vertex::Root.new(value: :root))
              @root.weight = ROOT_WEIGHT
              # Add the provided input values
              input_vertices = []
              initial_value = true

              input_vertices += inputs.map do |input_value|
                if input_value == GENERATE
                  initial_value = false
                  next
                end
                if input_value.is_a?(Type::NamedArgument)
                  iv = graph.add_vertex(
                    Graph::Vertex::NamedValue.new(
                      name: input_value.name.to_s,
                      value: input_value.value
                    )
                  )
                  iv.weight = input_value.name.to_s == named ? NAMED_VALUE_WEIGHT : VALUE_WEIGHT
                else
                  iv = graph.add_vertex(Graph::Vertex::Value.new(value: input_value))
                  iv.weight = initial_value ? SOURCE_WEIGHT : VALUE_WEIGHT
                end