function createProcCallBlock(
  workspace,
  hasReturn = false,
  nameId = 'proc name',
) {
  const type = hasReturn ? 'procedures_callreturn' : 'procedures_callnoreturn';
  return Blockly.Xml.domToBlock(
    Blockly.utils.xml.textToDom(
      '<block type="' +
        type +
        '">' +
        '  <mutation name="' +
        nameId +
        '"/>' +
        '</block>',
    ),
    workspace,
  );
}
Creates procedure call block using domToBlock call.
@param {!Blockly.Workspace} workspace The Blockly workspace.
@param {boolean=} hasReturn Whether the corresponding procedure definition
   has return.
@param {string=} nameId The procedure name.
@returns {Blockly.Block} The created block.