<commit_before>module CsvRowModel
  module Base
    module Children
      extend ActiveSupport::Concern

      def child?
        !!parent
      end

      def append_child(source, options={})
        self.class.has_many_relationships.each do |relation_name, child_class|
          child_row_model = child_class.new(source, options.reverse_merge(parent: self))
          if child_row_model.valid?
            public_send(relation_name) << child_row_model
            return child_row_model
          end
        end
        nil
      end

      module ClassMethods<commit_msg>family_public_send<commit_after>module CsvRowModel
  module Base
    module Children
      extend ActiveSupport::Concern

      def child?
        !!parent
      end

      def append_child(source, options={})
        self.class.has_many_relationships.each do |relation_name, child_class|
          child_row_model = child_class.new(source, options.reverse_merge(parent: self))
          if child_row_model.valid?
            public_send(relation_name) << child_row_model
            return child_row_model
          end
        end
        nil
      end

      def family_public_send(method)
        result = [public_send(method)]
        result << self.class.has_many_relationships.keys.map {|relation_name| public_send(relation_name).map(&method) }
        result.flatten!
        result.reject!(&:nil?)
        result
      end

      module ClassMethods
{'fraction_non_alphanumeric': 0.07112970711297072, 'fraction_numerical': 0.0, 'mean_word_length': 2.4004739336492893, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1667420', 'n_tokens_mistral': 409, 'n_tokens_neox': 396, 'n_words': 81}