code: def test_conv_output_length():
      from lasagne.layers.conv import conv_output_length
  
      assert conv_output_length(13, 5, 3, "valid") == 3
      assert conv_output_length(13, 5, 3, 0) == 3
      assert conv_output_length(13, 5, 3, "full") == 6
      assert conv_output_length(13, 5, 3, "same") == 5
      assert conv_output_length(13, 5, 3, 2) == 5
  
      with pytest.raises(ValueError) as exc:
          conv_output_length(13, 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 12 for calling a global function with example usage: test_conv_output_length() without return types