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: quantifier.rb
    path of file: ./repos/openfoodnetwork/app/models/spree/stock
    
    the code of the file until where you have to start completion: # frozen_string_literal: tru
    
      def fetch_stock_items
        # Don't re-fetch associated stock items from the DB if we've already eager-loaded them
        return @variant.stock_items if @variant.stock_items.loaded?

        Spree::StockItem.joins(:stock_location).
          where(:variant_id => @variant, Spree::StockLocation.table_name => { active: true })
      end