function connectBlockToConnection(workspace, connection) {
    const newBlock = workspace.newBlock('text');
    const targetConnection = newBlock.outputConnection;
    connection.connect(targetConnection);
  }
Creates a block and connects it to the specified connection.
@param {!Blockly.Workspace} workspace The workspace.
@param {!Blockly.Connection} connection The connection to connect a new
   block to.