code: def test_validation():
      model = chain(
          Relu(10), Relu(10), with_ragged(reduce_max()), Softmax()
      )
      with data_validation(True):
          with pytest.raises(DataValidationError):
              model.initialize(
                  X=model.ops.alloc2f(1, 10), Y=model.ops.alloc2f(1, 10)
              )
          with pytest.raises(DataValidationError):
              model.initialize(
                  X=model.ops.alloc3f(1, 10, 1),
                  Y=model.ops.alloc2f(1, 10),
              )
          with pytest.raises(DataValidationError):
              model.initialize(
                  X=[model.ops.alloc2f(1, 10)],
                  Y=model.ops.alloc2f(1, 10),
              )
  
imports: import pytest
  from thinc.api import ParametricAttention, Relu, Softmax, chain, list2ragged, reduce_max, reduce_sum, with_ragged
  from thinc.util import DataValidationError, data_validation
label_desc: Use image node_id 1 for calling a global function with example usage: test_validation() without return types