code: def test_add():
      data = numpy.asarray([[1, 2, 3, 4]], dtype="f")
      model = add(Linear(), Linear())
      model.initialize(data, data)
      Y, backprop = model(data, is_train=True)
      Y2 = sum(layer.predict(data) for layer in model.layers)
      assert numpy.array_equal(Y, Y2)
      dX = backprop(Y)
      assert dX.shape == data.shape
      # Test that nesting works
      model2 = add(model, Linear())
      assert len(model2.layers) == 3
      model.initialize(data, data)
      Y = model2.predict(data)
      Y2 = sum(layer.predict(data) for layer in model2.layers)
      assert numpy.array_equal(Y, Y2)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  from thinc.api import Dropout, Linear, Model, NumpyOps, add, clone, concatenate, map_list, noop
  from thinc.layers import chain, tuplify
label_desc: Use image node_id 34 for calling a global function with example usage: test_add() without return types