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: core_helpers.rb
    path of file: ./repos/ooor/lib/ooor/helpers
    
    the code of the file until where you have to start completion: #    OOOR: OpenObject On Ruby
#    Copyright (C) 2009-2012 Akretion LTDA (<http://www.akretion.com>).
#    Author: Akretion: RaphaÃ«l Valyi: CampToCamp: Nicolas Bessi, Joel Grand-Guillaume
#    Licensed under the MIT license, see MIT-LICENSE file

Ooor.xtend('ir.module.module') do

  ##########################################################################
  # Get recursively the whole list of modules dependencies
  # for a list of modules.
  # Do not add the module if it already exists in the input list
  # Input :
  #  - modules : A [] of valid IrModuleModule instances with dependencies_id attribute
  # Return
  #  -  [] of dependencies
  # Usage Example:
  # dependency_modules = get_dependencies(modules)
  def self.get_dependencies(modules)
    dependency_modules = []
    modules.select { |m| m.de
    
  def self.install_modules(modules)
    modules = modules.map { |name| self.find(:first, domain: {name: name})}
    modules.each do |mod|
      mod.button_install unless mod.state == "installed"
    end
    wizard = BaseModuleUpgrade.create
    wizard.upgrade_module
  end

  def print_dependency_graph
    modules = [self] + self.class.get_dependencies([self])

    File.open("#{self.name}-pre.dot", 'w') do |f|
      f << <<-eos
      digraph DependenciesByOOOR {
          fontname = "Helvetica"
          fontsize = 11
          label = "*** generated by OOOR by www.akretion.com ***"
          node [
                  fontname = "Helvetica"
                  fontsize = 11
                  shape = "record"
                  fillcolor=orange
                  style="rounded,filled"
          ]
      eos

      modules.each do |m|
        m.dependencies_id.each do |dep|
          f << "#{m.name} -> #{dep.name};\n"
        end
      end
      f << "}"
    end
    system("tred < #{self.name}-pre.dot > #{self.name}.dot")
    cmd_line2 = "dot -Tcmapx -o#{self.name}.map -Tpng -o#{self.name}.png #{self.name}.dot"
    system(cmd_line2)
  end
    
end