code: function getNestedNodes(concept, condition) {
    if (condition(concept)) {
      return concept;
    }
    if (!concept.items) {
      return [];
    }
    return concept.items.map(child => getNestedNodes(child, condition));
  }
docs: Returns a nested array containing only the leaf concepts, at their actual depths in the tree of nodes.