getNode (nodeName) {
    // First, make sure the state is up to date...
    this.validateState();

    // Check if the node exists by direct name first
    if (this.nodes[nodeName]) { return this.nodes[nodeName]; }

    // Then check by exact matching sub node name
    const nodes = filter(this.nodes, (node) => {
      if (node.nodes) {
        return includes(node.nodes.map(n => n.name), nodeName);
      }
      return false;
    });
    return nodes[0];
  }
Get a node object by name. Also will match on sub-node names if no match found in the
top-level graph.

@param {string} nodeName the name of the node to get
@returns {object} The node object that matches on nodeName, otherwise undefined