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: server_role.rb
    path of file: ./repos/manageiq/app/models
    
    the code of the file until where you have to start completion: class ServerRole < ApplicationRecord
  has_many :assigned_server_roles
  has_many :miq_servers, :through => :assigned_server_roles

  validates :name, :presence => true, :uniqueness_when_changed => true

  scope :database_roles, -> { where(:role_scope => 'database').order(:name) }
  scope :region_roles,   -> { where(:role_scope => 'region').order(:name) }
  scope :zone_roles,     -> { where(:role_scope => 'zone').order(:name) }

  def self.seed
    se
    
  def self.seed
    server_roles = all.index_by(&:name)

    server_role_paths = [fixture_path] + Vmdb::Plugins.server_role_paths

    csv_rows = server_role_paths.flat_map do |path|
      CSV.foreach(path, :headers => true, :skip_lines => /^#/).map(&:to_hash)
    end

    csv_rows.each do |action|
      rec = server_roles[action['name']]
      if rec.nil?
        _log.info("Creating Server Role [#{action['name']}]")
        create(action)
      else
        rec.attributes = action
        if rec.changed?
          _log.info("Updating Server Role [#{action['name']}]")
          rec.save
        end
      end