code: def test_recursive_double_wrap():
      def dummy_model(name, layers):
          return Model(
              name, lambda model, X, is_train: ..., layers=layers
          )
  
      relu = Relu(5)
      chained = chain(relu, relu)
      concat = concatenate(chained, chained, relu)
      concat_wrapped = wrap_model_recursive(
          concat,
          lambda model: dummy_model(f"dummy({model.name})", [model]),
      )
  
      n_debug = 0
      for model in concat_wrapped.walk():
          if model.name.startswith("dummy"):
              n_debug += 1
  
      # There should be 3 unique dummy wrappers:
      # * Around concatenate.
      # * Around chain.
      # * Around relu.
      assert n_debug == 3
  
      assert (
          concat_wrapped.layers[0].layers[0].layers[0].layers[0].name
          == "dummy(relu)"
      )
      assert (
          concat_wrapped.layers[0].layers[0].layers[0].layers[1].name
          == "dummy(relu)"
      )
      assert (
          concat_wrapped.layers[0].layers[1].layers[0].layers[0].name
          == "dummy(relu)"
      )
      assert (
          concat_wrapped.layers[0].layers[1].layers[0].layers[1].name
          == "dummy(relu)"
      )
      assert concat_wrapped.layers[0].layers[2].name == "dummy(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 30 for calling a global function with example usage: test_recursive_double_wrap() and returns: Model