createSerializedDataToBlockTestCallback = (testCase) => {
    return function () {
      let block;
      if (testCase.json) {
        block = blockly.serialization.blocks.append(
          testCase.json,
          this.workspace,
          {recordUndo: true},
        );
      } else {
        block = blockly.Xml.domToBlock(
          blockly.utils.xml.textToDom(testCase.xml),
          this.workspace,
        );
      }
      if (globalThis.clock) globalThis.clock.runAll();
      testCase.assertBlockStructure(block);
    };
  }
Creates test callback for xmlToBlock test.
@param {!SerializationTestCase} testCase The test case information.
@returns {!Function} The test callback.