code: def convolve(signal, kernel):
      """Convolve the iterable *signal* with the iterable *kernel*.
  
          >>> signal = (1, 2, 3, 4, 5)
          >>> kernel = [3, 2, 1]
          >>> list(convolve(signal, kernel))
          [3, 8, 14, 20, 26, 14, 5]
  
      Note: the input arguments are not interchangeable, as the *kernel*
      is immediately consumed and stored.
  
      """
      kernel = tuple(kernel)[::-1]
      n = len(kernel)
      window = deque([0], maxlen=n) * n
      for x in chain(signal, repeat(0, n - 1)):
          window.append(x)
          yield sum(map(operator.mul, kernel, window))
  
imports: import warnings
  from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest
  import operator
  from random import randrange, sample, choice
label_desc: Use image node_id 28 for calling a global function with example usage: convolve(signal, kernel) without return types