code: def test_conv_input_length():
      from lasagne.layers.conv import conv_input_length
  
      # using the examples from https://github.com/vdumoulin/conv_arithmetic
      # no padding, no strides
      assert conv_input_length(2, 3, 1, "valid") == 4
      assert conv_input_length(2, 3, 1, 0) == 4
      # padding, no strides
      assert conv_input_length(6, 4, 1, 2) == 5
      # no padding, strides
      assert conv_input_length(2, 3, 2, 0) == 5
      # padding, strides
      assert conv_input_length(3, 3, 2, "same") == 5
      # full convolution
      assert conv_input_length(3, 3, 2, "full") == 3
  
      with pytest.raises(ValueError) as exc:
          conv_input_length(3, 5, 3, "_nonexistent_mode")
      assert "Invalid pad: " in exc.value.args[0]
  
imports: import numpy
  import pytest
  import importlib
  import theano
  from theano import tensor
  import lasagne
  from lasagne.utils import floatX, as_tuple
label_desc: Use image node_id 13 for calling a global function with example usage: test_conv_input_length() without return types