function isInSentenceWithCJSpaces({ parent: sentenceNode }) {
  if (sentenceNode.usesCJSpaces === undefined) {
    const stats = { " ": 0, "": 0 };
    const { children } = sentenceNode;

    for (let i = 1; i < children.length - 1; ++i) {
      const node = children[i];
      if (
        node.type === "whitespace" &&
        (node.value === " " || node.value === "")
      ) {
        const previousKind = children[i - 1].kind;
        const nextKind = children[i + 1].kind;
        if (
          (previousKind === KIND_CJ_LETTER && nextKind === KIND_NON_CJK) ||
          (previousKind === KIND_NON_CJK && nextKind === KIND_CJ_LETTER)
        ) {
          ++stats[node.value];
        }
      }
    }

    // Inject a property to cache the result.
    sentenceNode.usesCJSpaces = stats[" "] > stats[""];
  }

  return sentenceNode.usesCJSpaces;
}
Determine the preferred style of spacing between Chinese or Japanese and non-CJK
characters in the parent `sentence` node.

@param {AstPath} path
@returns {boolean} `true` if Space tends to be inserted between CJ and
non-CJK, `false` otherwise.