setGraph(graph) {
    this.ready = false;
    if (typeof graph === 'object') {
      if (typeof graph.addNode === 'function') {
        // Existing Graph object
        return this.createNetwork(graph);
      }
      // JSON definition of a graph
      return noflo.graph.loadJSON(graph)
        .then((instance) => this.createNetwork(instance));
    }
    let graphName = graph;
    if ((graphName.substr(0, 1) !== '/') && (graphName.substr(1, 1) !== ':') && process && process.cwd) {
      graphName = `${process.cwd()}/${graphName}`;
    }
    return noflo.graph.loadFile(graphName)
      .then((instance) => this.createNetwork(instance));
  }
@param {import("fbp-graph").Graph|string} graph
@returns {Promise<void>}