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: migrate_deprecated_flash_arguments.rb
    path of file: ./repos/view_components/lib/primer/view_components/linters
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative "helpers/rubocop_helpers"

module ERBLint
  module Linters
    # Migrates deprecated arguments in Primer::Beta::Flash components to their equivalents.
    class MigrateDeprecatedFlashArguments < Linter
      # Taken from https://github.com/rails/rails/blob/main/actionview/lib/action_view/template/handlers/erb/erubi.rb#L45
      BLOCK_EXPR = /\s*((\s+|\))do|\{)(\s*\|[^|]
    
      def run(processed_source)
        processed_source.ast.descendants(:erb).each do |erb_node|
          indicator_node, _, code_node = *erb_node
          code = code_node.children.first
          ast = erb_ast(maybe_close_block(code))
          next unless ast

          constructor_arg_hashes = find_new_flash_instances(ast)
          next if constructor_arg_hashes.empty?

          indicator, = *indicator_node
          indicator ||= ""

          # +2 to account for the leading "<%" characters
          code_start_pos = erb_node.location.begin_pos + indicator.size + 2

          constructor_arg_hashes.each do |constructor_arg_hash|
            spacious_arg = constructor_arg_hash.include?(:spacious)
            next unless spacious_arg

            orig_loc = code_node.location
            key_node, value_node = constructor_arg_hash[:spacious]

            new_loc = orig_loc.with(
              begin_pos: key_node.location.expression.begin_pos + code_start_pos,
              end_pos: value_node.location.expression.end_pos + code_start_pos
            )

            if value_node.source == "true"
              add_offense(
                new_loc,
                "The :spacious argument is deprecated. Use `mb: 4` instead.",
                "mb: 4"
              )
            else
              new_loc = adjust_to_preceding_comma(new_loc)

              add_offense(
                new_loc,
                "The :spacious argument is deprecated; `spacious: false` can be removed.",
                ""
              )
            end
          end
        end