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: extensions.rb
    path of file: ./repos/sequencescape/app/models/concerns/aasm
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# AASM is a state machine provided by the gem aasm
module AASM
  # Provides ex
    
    def suggested_transition_to(target)
      valid_events =
        aasm
          .events(permitted: true)
          .select { |event| permit_automatic_transition?(event) && event.transitions_to_state?(target.to_sym) }

      return valid_events.first.name if valid_events.one?

      raise StandardError, "#{valid_events.length} permitted transitions from '#{state}' to '#{target}'"
    end