code: def test_recursive_wrap():
      def dummy_model(name, layers):
          return Model(
              name, lambda model, X, is_train: ..., layers=layers
          )
  
      # Check:
      #
      # * Recursion: chain -> relu
      # * Multiple sublayers: chain -> [relu, relu]
  
      relu = Relu(5)
      chained = chain(relu, relu)
      chained_debug = wrap_model_recursive(
          chained,
          lambda model: dummy_model(f"dummy({model.name})", [model]),
      )
  
      assert chained_debug.name == "dummy(relu>>relu)"
      assert chained_debug.layers[0] is chained
      assert chained_debug.layers[0].layers[0].name == "dummy(relu)"
      assert chained_debug.layers[0].layers[0].layers[0] is relu
      assert chained_debug.layers[0].layers[1].name == "dummy(relu)"
      assert chained_debug.layers[0].layers[1].layers[0] is relu
  
imports: import threading
  import time
  from collections import Counter
  import numpy
  import pytest
  from thinc.api import Adam, CupyOps, Dropout, Linear, Model, Relu, Shim, Softmax, chain, change_attr_values, concatenate, set_dropout_rate, use_ops, with_debug, wrap_model_recursive
  from thinc.compat import has_cupy_gpu
  from ..util import make_tempdir
label_desc: Use image node_id 29 for calling a global function with example usage: test_recursive_wrap() and returns: Model