delete (nodeId) {
    const node = this.nodes.get(nodeId)
    if (!node) return
    node.dispose()
    this.nodes.delete(nodeId)

    const change = {
      type: 'delete',
      node: node
    }

    if (this.__QUEUE_INDEXING__) {
      this.queue.push(change)
    } else {
      this._updateIndexes(change)
    }

    return node
  }
Delete the node with given id.

    @param {String} nodeId
    @returns {Node} The deleted node.