def zero_pad(activation_map, padding):
  """Appends vectors of zeros on all the 4 sides of the image.

  Args:
    activation_map: list of list of z3.ExprRef, activation map to be 0-padded.
    padding: tuple, number of layers 0 padded vectors on top / left side of the
        image, number of layers 0 padded vectors on bottom / right side of the
        image.

  Returns:
    list of list of z3.ExrRef, 0 padded activation map.
  """
  num_rows = len(activation_map)
  num_columns = len(activation_map[0])

  # padded_activation_map has a shape - (num_padded_rows, num_padded_columns)
  padded_activation_map = []
  for _ in range(num_rows + padding[0] + padding[1]):
    padded_activation_map.append([0] * (num_columns + padding[0] + padding[1]))

  for i in range(num_rows):
    for j in range(num_columns):
      padded_activation_map[padding[0] + i][padding[0] +
                                            j] = activation_map[i][j]
  return padded_activation_map