def scoped_query(query)
      if query.kind_of?(Query)
        query.dup
      else
        self.query.relative(query)
      end
    end
def scoped_query(query)
      if query.kind_of?(Query)
        query.dup
      else
        self.query.relative(query)
      end
    end
Return the absolute or relative scoped query

 @param [Query, Hash] query
   the query to scope the collection with

 @return [Query]
   the absolute or relative scoped query

 @api private