code: def test_CustomRecurrentLayer_child_kwargs():
      in_shape = (2, 3, 4)
      n_hid = 5
      # Construct mock for input-to-hidden layer
      in_to_hid = Mock(
          Layer,
          output_shape=(in_shape[0] * in_shape[1], n_hid),
          input_shape=(in_shape[0] * in_shape[1], in_shape[2]),
          input_layer=InputLayer(
              (in_shape[0] * in_shape[1], in_shape[2])
          ),
          get_output_kwargs=["foo"],
      )
      # These two functions get called, need to return dummy values for them
      in_to_hid.get_output_for.return_value = T.matrix()
      in_to_hid.get_params.return_value = []
      # As above, for hidden-to-hidden layer
      hid_to_hid = Mock(
          Layer,
          output_shape=(in_shape[0], n_hid),
          input_shape=(in_shape[0], n_hid),
          input_layer=InputLayer((in_shape[0], n_hid)),
          get_output_kwargs=[],
      )
      hid_to_hid.get_output_for.return_value = T.matrix()
      hid_to_hid.get_params.return_value = []
      # Construct a CustomRecurrentLayer using these Mocks
      l_rec = lasagne.layers.CustomRecurrentLayer(
          InputLayer(in_shape), in_to_hid, hid_to_hid
      )
      # Call get_output with a kwarg, should be passd to in_to_hid and hid_to_hid
      helper.get_output(l_rec, foo="bar")
      # Retrieve the arguments used to call in_to_hid.get_output_for
      args, kwargs = in_to_hid.get_output_for.call_args
      # Should be one argument - the Theano expression
      assert len(args) == 1
      # One keywould argument - should be 'foo' -> 'bar'
      assert kwargs == {"foo": "bar"}
      # Same as with in_to_hid
      args, kwargs = hid_to_hid.get_output_for.call_args
      assert len(args) == 1
      assert kwargs == {"foo": "bar"}
  
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 57 for calling a global function with example usage: test_CustomRecurrentLayer_child_kwargs() without return types