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

# This concern rela
    
    def self.order_by_average_marking_time(staff)
      staff.sort do |x, y|
        if x.average_marking_time && y.average_marking_time
          x.average_marking_time <=> y.average_marking_time
        else
          x.average_marking_time ? -1 : 1
        end
      end