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

#
# Base
    
    def grouped_and_sorted_uat_actions
      # raise error if any categories are not in the list
      all.each do |uat_action|
        unless CATEGORY_LIST.include?(uat_action.category)
          raise "Category '#{uat_action.category}' from '#{uat_action}' is not in the list" \
                  " of categories #{CATEGORY_LIST}"
        end
      end