code: def test_begin_update_matches_predict(W_b_input):
      model = get_model(W_b_input)
      nr_batch, nr_out, nr_in = get_shape(W_b_input)
      W, b, input_ = W_b_input
      fwd_via_begin_update, finish_update = model.begin_update(input_)
      fwd_via_predict_batch = model.predict(input_)
      assert_allclose(fwd_via_begin_update, fwd_via_predict_batch)
  
imports: import numpy
  import pytest
  from hypothesis import given, settings
  from mock import MagicMock
  from numpy.testing import assert_allclose
  from thinc.api import SGD, Dropout, Linear, chain
  from ..strategies import arrays_OI_O_BI
  from ..util import get_model, get_shape
label_desc: Use image node_id 4 for calling a global function with example usage: test_begin_update_matches_predict(W_b_input) without return types