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: ASModel_object_graph.rb
    path of file: ./repos/archivesspace/backend/app/model
    
    the code of the file until where you have to start completion: ## Background
##
# This module implements the notion of "object graphs" for ArchivesSpace record
# types.  A record's object graph is the set of all records it is connected to.
# This can include:
#
#  * The nested 
    
    def each(&block)
      if block_given?
        @graph.keys.each do |model|
          block.call(model, @graph[model].to_a)
        end
      else
        Enumerator.new do |y|
          @graph.map {|model, ids|
            y << [model, ids.to_a]
          }
        end
      end