code: def effective_kernel(kernel_shape, dilations):
      """
  
      Args:
          kernel_shape: tuple[int] representing the kernel shape in each
              given dimension.
          dilations: tuple[int] representing the dilation of the kernel
              in each given dimension.  Must be the same length as
              kernel_shape, and is assumed to give the dimensions in
              the same order as kernel_shape
  
      Returns: tuple[int] representing the effective shape of the kernel
          in each given dimension, with each dimension in the order given,
          taking into account dilation.
          See http://deeplearning.net/software/theano/tutorial/conv_arithmetic.html#dilated-convolutions
          Note that a dilation of 1 is equivalent to having no dilation.
  
      """
      if len(kernel_shape) != len(dilations):
          raise ValueError(
              f"kernel_shape ({len(kernel_shape)}) and dilations ({len(dilations)}) "
              f"must be the same length"
          )
      return tuple(
          [(k - 1) * d + 1 for k, d in zip(kernel_shape, dilations)]
      )
  
imports: import math
  import numbers
  from typing import List, Tuple
  import numpy
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Var, get_new_symbol, types
  from coremltools.converters.mil.mil.ops.defs.iOS15.elementwise_unary import cast
  from coremltools.converters.mil.mil.types import builtin_to_string, promote_dtypes
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
label_desc: Use image node_id 4 for calling a global function with example usage: effective_kernel(kernel_shape, dilations) and returns: tuple