code: def test_custom_recurrent_arbitrary_depth():
      # Check that the custom recurrent layer can handle a hidden-to-hidden
      # network with an arbitrary depth
      n_batch, n_steps, n_channels, width, height = (2, 3, 4, 5, 6)
      n_out_filters = 7
      n_in_hid_filters_0 = 11
      n_hid_hid_filters_0 = 13
      filter_shape = (3, 3)
      l_in = lasagne.layers.InputLayer(
          (n_batch, n_steps, n_channels, width, height)
      )
  
      # Expect the output shape of `l_in` as input shape for input-to-hidden
      l_in_to_hid = lasagne.layers.InputLayer(
          (None, n_channels, width, height)
      )
      # Two conv layers; first to `n_hid_filters_0` channels
      l_in_to_hid = lasagne.layers.Conv2DLayer(
          l_in_to_hid, n_in_hid_filters_0, filter_shape, pad="same"
      )
      # then to `n_out_filters` channels
      l_in_to_hid = lasagne.layers.Conv2DLayer(
          l_in_to_hid, n_out_filters, filter_shape, pad="same"
      )
  
      # Expect the output shape of `l_in_to_hid` as input shape for
      # hidden-to-hidden
      l_hid_to_hid = lasagne.layers.InputLayer(
          (None, n_out_filters, width, height)
      )
      # Two conv layers; first to `n_hid_hid_filters_0` channels
      l_hid_to_hid = lasagne.layers.Conv2DLayer(
          l_hid_to_hid, n_hid_hid_filters_0, filter_shape, pad="same"
      )
      # then to `n_out_filters` channels
      l_hid_to_hid = lasagne.layers.Conv2DLayer(
          l_hid_to_hid, n_out_filters, filter_shape, pad="same"
      )
  
      l_rec = lasagne.layers.CustomRecurrentLayer(
          l_in, l_in_to_hid, l_hid_to_hid
      )
  
      assert l_rec.output_shape == (
          n_batch,
          n_steps,
          n_out_filters,
          width,
          height,
      )
  
      out = theano.function(
          [l_in.input_var], lasagne.layers.get_output(l_rec)
      )
      out_shape = out(
          np.zeros(
              (n_batch, n_steps, n_channels, width, height),
              dtype=theano.config.floatX,
          )
      ).shape
      assert out_shape == (
          n_batch,
          n_steps,
          n_out_filters,
          width,
          height,
      )
  
imports: import pytest
  from lasagne.layers import RecurrentLayer, LSTMLayer, CustomRecurrentLayer
  from lasagne.layers import InputLayer, DenseLayer, GRULayer, Gate, Layer
  from lasagne.layers import helper
  import theano
  import theano.tensor
  import numpy
  import lasagne
  from mock import Mock
label_desc: Use image node_id 12 for calling a global function with example usage: test_custom_recurrent_arbitrary_depth() without return types