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: queries.rb
    path of file: ./repos/active_enumerable/lib/active_enumerable
    
    the code of the file until where you have to start completion: require "active_enumerable/order"
require "bigdecimal"

module ActiveEnumerable
  module Queries
    # Find by id - Depends on either having an Object#id or Hash{id: Integer}
    # This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 
    
    def find(*args)
      raise RecordNotFound.new("Couldn't find #{self.respond_to?(:name) ? self.name : self.class.name} without an ID") if args.compact.empty?
      if args.count > 1 || args.first.is_a?(Array)
        __new_relation__(args.flatten.lazy.map do |id|
          find_by!(id: id.to_i)
        end)
      else
        find_by!(id: args.first.to_i)
      end
    end