constructor(metadata) {
    super();
    this.metadata = metadata;
    /** @type {import("../lib/Network").Network|null} */
    this.network = null;
    this.ready = true;
    this.started = false;
    this.starting = false;
    /** @type {string|null} */
    this.baseDir = null;
    /** @type {noflo.ComponentLoader|null} */
    this.loader = null;
    this.load = 0;

    this.inPorts = new noflo.InPorts({
      graph: {
        datatype: 'all',
        description: 'NoFlo graph definition to be used with the subgraph component',
        required: true,
      },
    });
    this.outPorts = new noflo.OutPorts();

    this.inPorts.ports.graph.on('ip', (packet) => {
      if (packet.type !== 'data') { return; }
      // TODO: Port this part to Process API and use output.error method instead
      this.setGraph(packet.data).catch(this.error);
    });
  }
@param {import("fbp-graph/lib/Types").GraphNodeMetadata} [metadata]