code: function getHighestSelectedBlocks(value: Value): List<Block> {
      const range = value.selection;
      const { document } = value;
  
      const startBlock = document.getClosestBlock(range.startKey);
      const endBlock = document.getClosestBlock(range.endKey);
  
      if (startBlock === endBlock) {
          return List([startBlock]);
      }
      const ancestor = document.getCommonAncestor(startBlock.key, endBlock.key);
      const startPath = ancestor.getPath(startBlock.key);
      const endPath = ancestor.getPath(endBlock.key);
  
      return ancestor.nodes.slice(startPath[0], endPath[0] + 1);
  }
docs: Returns the highest list of blocks that cover the current selection