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: user_auth_token.rb
    path of file: ./repos/discourse/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require "digest/sha1"

class UserAuthToken < ActiveRecord::Base
  belongs_to :user

  ROTATE_TIME_MINS = 10
  ROTATE_TIME = ROTATE_TIME_MINS.minutes
  # used when token did not arrive at client
  URGENT_ROTATE_TIME = 1.minute

  MAX_SESSION_
    
  def self.is_suspicious(user_id, user_ip)
    return false unless User.find_by(id: user_id)&.staff?

    ips = UserAuthTokenLog.where(user_id: user_id).pluck(:client_ip)
    ips.delete_at(ips.index(user_ip) || ips.length) # delete one occurrence (current)
    ips.uniq!
    return false if ips.empty? # first login is never suspicious

    if user_location = login_location(user_ip)
      ips.none? do |ip|
        if location = login_location(ip)
          distance(user_location, location) < SiteSetting.max_suspicious_distance_km
        end
      end