code: function traverseToParentIf(node) {
    let parent = node.parent;
    while (parent) {
      if (parent.type === 'IfStatement') {
        return parent;
      }
      parent = parent.parent;
    }
  }
docs: TODO: memoize this