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: value_stat_getter.rb
    path of file: ./repos/forest-rails/app/services/forest_liana
    
    the code of the file until where you have to start completion: module ForestLiana
  class ValueStatGetter < StatGetter
    attr_accessor :record

    def perform
      return if @params[:aggregator].blank?
      resource = optimize_record_loading(@resource, get_resource)

      filters = ForestLiana::ScopeManager.append_sc
    
    def perform
      return if @params[:aggregator].blank?
      resource = optimize_record_loading(@resource, get_resource)

      filters = ForestLiana::ScopeManager.append_scope_for_user(@params[:filter], @user, @resource.name, @params['contextVariables'])

      unless filters.blank?
        filter_parser = FiltersParser.new(filters, resource, @params[:timezone], @params)
        resource = filter_parser.apply_filters
        raw_previous_interval = filter_parser.get_previous_interval_condition

        if raw_previous_interval
          previous_value = filter_parser.apply_filters_on_previous_interval(raw_previous_interval)
        end