Code Explainers
def build_tree(rows, root_id: nil) children_by_parent = Hash.new { |hash, key| hash[key] = [] } rows.each do |row|