code: def test_sequence_data_mismatch():
      x = C.input_variable((1,), name="x")
      ones = C.sequence.input_variable((1,), name="ones")
      y_broadcast_last = C.sequence.broadcast_as(
          C.sequence.last(ones), x
      )
      y_broadcast_first = C.sequence.broadcast_as(
          C.sequence.first(ones), x
      )
  
      x0 = np.array([1, 2, 3, 4], dtype=np.float32).reshape(4, 1)
      o0 = np.array([1], dtype=np.float32).reshape(1, 1)
  
      with pytest.raises(ValueError):
          y_broadcast_last_result = y_broadcast_last.eval(
              {x: [x0], ones: [o0]}
          )
  
      with pytest.raises(ValueError):
          y_broadcast_first_result = y_broadcast_first.eval(
              {x: [x0], ones: [o0]}
          )
  
imports: import numpy
  import os
  import pytest
  import cntk
  from .ops_test_utils import compare_lists_of_np_arrays, AA, cntk_device
  from cntk.io import MinibatchSource, CTFDeserializer, StreamDefs, StreamDef
label_desc: Use image node_id 13 for calling a global function with example usage: test_sequence_data_mismatch() without return types