code: def test_conv_pad(impl, pad):
      import lasagne.theano_extensions.conv
  
      conv = getattr(lasagne.theano_extensions.conv, impl)
  
      X = T.tensor3()
      W = T.tensor3()
      input = lasagne.utils.floatX(np.ones((1, 1, 12)))
      kernel = lasagne.utils.floatX(np.random.uniform(-1, 1, (2, 1, 3)))
  
      conv_theano = conv(
          X, W, input.shape, kernel.shape, border_mode=pad
      ).eval({X: input, W: kernel})
  
      pad = pad[0] if isinstance(pad, tuple) else pad
      input = np.pad(
          input, [(0, 0), (0, 0), (pad, pad)], mode="constant"
      )
      conv_np = conv1d(input, kernel)
  
      assert np.allclose(conv_theano, conv_np)
  
file_path: Lasagne/lasagne/tests/test_theano_extensions.py
imports: import pytest
  import numpy
  import theano.tensor
  import lasagne
label_desc: Use image node_id 4 for calling a global function with example usage: test_conv_pad(impl, pad) without return types