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: rspec_factory.rb
    path of file: ./repos/souls/lib/souls/cli/update
    
    the code of the file until where you have to start completion: module SOULs
  class Update < Thor
    desc "rspec_factory [CLASS_NAME]", "Update GraphQL Type from schema.rb"
    def rspec_factory(class_name)
      singularized_class_name = class_name.singularize.underscore
      pluralized_class_name = class_name.pluralize.underscore
      new_cols = SOULs.get_columns_num(class_name: singularized_class_name)
      dir_name = "./spec/factories"
      new_file_path = "tmp/create_factory.rb"
      file_path = "#{dir_name}/#{pluralized_class_name}.rb"
      argument = false
      File.open(file_path) do |f|
        File.open(new_file_path, "w") do |new_line|
          f.each_line do |line|
            new_line.write(line)
            next unless line.include?("{") && !argument

            new_cols.each do |col|
              next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"

              type = SOULs.get_test_type(col[:type])
              type = "[#{type}]" if col[:array]
              args = check_factory_argument(class_name:)

              new_line.write("    #{col[:col
    
    def rspec_factory(class_name)
      singularized_class_name = class_name.singularize.underscore
      pluralized_class_name = class_name.pluralize.underscore
      new_cols = SOULs.get_columns_num(class_name: singularized_class_name)
      dir_name = "./spec/factories"
      new_file_path = "tmp/create_factory.rb"
      file_path = "#{dir_name}/#{pluralized_class_name}.rb"
      argument = false
      File.open(file_path) do |f|
        File.open(new_file_path, "w") do |new_line|
          f.each_line do |line|
            new_line.write(line)
            next unless line.include?("{") && !argument

            new_cols.each do |col|
              next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"

              type = SOULs.get_test_type(col[:type])
              type = "[#{type}]" if col[:array]
              args = check_factory_argument(class_name:)

              new_line.write("    #{col[:column_name]} { #{type} }\n") unless args.include?(col[:column_name])
            end
            argument = true
          end
        end
      end
      FileUtils.rm(file_path)
      FileUtils.mv(new_file_path, file_path)
      SOULs::Painter.update_file(file_path.to_s)
    end