code: def test_convolution_dilated(
      input_size, conv_size, result, padding, device_id, precision
  ):
      if device_id == -1:
          pytest.skip("Test only runs on GPU")
  
      dt = PRECISION_TO_TYPE[precision]
      dev = cntk_device(device_id)
  
      # fill input operand with a sequence 0,1,2,3,... til total size and then
      # resize to input_size
      total_size = np.prod(input_size)
      x = np.arange(total_size, dtype=dt)
      input_operand = x.reshape(input_size)
  
      a = C.input_variable(
          shape=input_operand.shape[1:],
          dtype=sanitize_dtype_cntk(precision),
          needs_gradient=False,
          name="a",
      )
  
      # do the same for convolution kernel
      total_size = np.prod(conv_size)
      y = np.arange(total_size, dtype=dt)
      conv_map = constant(value=y.reshape(conv_size), device=dev)
  
      from cntk import convolution
  
      input_op = convolution(
          conv_map, a, auto_padding=[padding], dilation=2
      )
  
      forward_input = {a: input_operand}
      expected_forward = AA(result)
  
      unittest_helper(
          input_op,
          forward_input,
          expected_forward,
          None,
          device_id=device_id,
          precision=precision,
      )
  
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from .ops_test_utils import unittest_helper, _test_unary_op, AA, precision, PRECISION_TO_TYPE, constant, cntk_device
  from cntk.ops import AVG_POOLING, MAX_POOLING, MAX_UNPOOLING
  from cntk.internal import sanitize_dtype_cntk
  from cntk.cntk_py import should_force_deterministic_algorithms
label_desc: Use image node_id 21 for calling a global function with example usage: test_convolution_dilated(input_size, conv_size, result, padding, device_id, precision) without return types