renameNode(oldId, newId, callback) {
    const process = this.getNode(oldId);
    let promise;
    if (!process) {
      promise = Promise.reject(new Error(`Process ${oldId} not found`));
    } else {
      // Inform the process of its ID
      process.id = newId;
      if (process.component) {
        // Inform the ports of the node name
        const inPorts = process.component.inPorts.ports;
        const outPorts = process.component.outPorts.ports;
        Object.keys(inPorts).forEach((name) => {
          const port = inPorts[name];
          if (!port) { return; }
          port.node = newId;
        });
        Object.keys(outPorts).forEach((name) => {
          const port = outPorts[name];
          if (!port) { return; }
          port.node = newId;
        });
      }
      this.processes[newId] = process;
      delete this.processes[oldId];
      promise = Promise.resolve();
    }
    if (callback) {
      deprecated('Providing a callback to Network.renameNode is deprecated, use Promises');
      promise.then(() => {
        callback(null);
      }, callback);
    }
    return promise;
  }
@param {string} oldId
@param {string} newId
@param {ErrorableCallback} [callback]
@returns {Promise<void>}