<commit_before>class Sequencer
  class Unit
    module Common
      class FallbackProvider < Sequencer::Unit::Base

        def process
          provides = self.class.provides
          raise 'Only one provide attribute possible' if provides.size != 1

          attribute = provides.shift
          return if state.provided?(attribute)

          result = fallback

          # don't store nil values which are default anyway
          return if result.nil?

          state.provide(attribute, result)
        end

        private
<commit_msg>Fixed bug: Calling .shift on class variables provides leads to errors when Unit class is used multiple times.<commit_after>class Sequencer
  class Unit
    module Common
      class FallbackProvider < Sequencer::Unit::Base

        def process
          provides = self.class.provides
          raise 'Only one provide attribute possible' if provides.size != 1

          attribute = provides.first
          return if state.provided?(attribute)

          result = fallback

          # don't store nil values which are default anyway
          return if result.nil?

          state.provide(attribute, result)
        end

        private

{'fraction_non_alphanumeric': 0.05480607082630692, 'fraction_numerical': 0.0016863406408094434, 'mean_word_length': 2.14021164021164, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5904169', 'n_tokens_mistral': 285, 'n_tokens_neox': 268, 'n_words': 105}