This method finds the common ancestor of two nodes in a binary tree.Any style suggestions or ways to make it more idiomatic? Is the algorithm correct? Rubocop says the cyclomatic complexity is too high, how would you break this up?class Node  def initialize(value = nil, left = nil, right = nil)    @value = value    @left = left    @right = right  endenddef common_ancestor(node, value1, value2)  return node unless node  return node if node.value == value1 || node.value == value2  anc_left = common_ancestor(node.left, value1, value2)  anc_right = common_ancestor(node.right, value1, value2)  return node if anc_left && anc_right  anc_left || anc_rightend
Common ancestor in a binary tree
ruby;tree