<commit_before>require 'gh'

module GH
  # Public: ...
  class LazyLoader < Wrapper
    wraps GH::Normalizer
    double_dispatch

    def modify_hash(hash, loaded = false)
      hash = super(hash)
      link = hash['_links'].try(:[], 'self') unless loaded
      setup_lazy_loading(hash, link['href']) if link
      hash
    rescue Exception => error
      raise Error.new(error, hash)
    end

    private

    def lazy_load(hash, key, link)
      result = modify_hash(backend[link].data, true)
    rescue Exception => error
      raise Error.new(error, hash)
    end
  end
end<commit_msg>remove unused var<commit_after>require 'gh'

module GH
  # Public: ...
  class LazyLoader < Wrapper
    wraps GH::Normalizer
    double_dispatch

    def modify_hash(hash, loaded = false)
      hash = super(hash)
      link = hash['_links'].try(:[], 'self') unless loaded
      setup_lazy_loading(hash, link['href']) if link
      hash
    rescue Exception => error
      raise Error.new(error, hash)
    end

    private

    def lazy_load(hash, key, link)
      modify_hash(backend[link].data, true)
    rescue Exception => error
      raise Error.new(error, hash)
    end
  end
end
{'fraction_non_alphanumeric': 0.1082693947144075, 'fraction_numerical': 0.0, 'mean_word_length': 2.7993527508090614, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7019241', 'n_tokens_mistral': 369, 'n_tokens_neox': 367, 'n_words': 102}