function parentMatches(predicateFn) {
  return function (node) {
    var parent = node.parentNode;
    while (parent !== undefined) {
      if (predicateFn(parent)) {
        return true;
      }
      parent = parent.parentNode;
    }
    return false;
  };
}
Returns a predicate that matches any node with a parent matching
`predicateFn`.