<commit_before>module Neo4j
  module Core
    module TxMethods
      def tx_methods(*methods)
        methods.each do |method|
          tx_method = "#{method}_in_tx"
          send(:alias_method, tx_method, method)
          send(:define_method, method) do |*args, &block|
            session = args.last.is_a?(Neo4j::Session) ? args.pop : Neo4j::Session.current!

            Neo4j::Transaction.run(session.auto_commit?) { send(tx_method, *args, &block) }
          end
        end
      end
    end

    module Config
      def self.using_new_session?
        !ENV.key?('LEGACY_NEO4J_SESSIONS') || ENV.key?('NEW_NEO4J_SESSIONS')
      end
    end
  end
end<commit_msg>Simplify this condition since we're only using the one ENV variable for the moment<commit_after>module Neo4j
  module Core
    module TxMethods
      def tx_methods(*methods)
        methods.each do |method|
          tx_method = "#{method}_in_tx"
          send(:alias_method, tx_method, method)
          send(:define_method, method) do |*args, &block|
            session = args.last.is_a?(Neo4j::Session) ? args.pop : Neo4j::Session.current!

            Neo4j::Transaction.run(session.auto_commit?) { send(tx_method, *args, &block) }
          end
        end
      end
    end

    module Config
      def self.using_new_session?
        ENV.key?('NEW_NEO4J_SESSIONS')
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10487982520029134, 'fraction_numerical': 0.008011653313911144, 'mean_word_length': 2.46095717884131, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7454747', 'n_tokens_mistral': 457, 'n_tokens_neox': 448, 'n_words': 97}