def blend(lapl_pyr_white, lapl_pyr_black, gauss_pyr_mask):
    """ Blend the two Laplacian pyramids by weighting them according to the
    Gaussian mask.

    Args:
      lapl_pyr_white (list): A Laplacian pyramid of one image, as constructed
                        by your lapl_pyramid function.

      lapl_pyr_black (list): A Laplacian pyramid of another image, as
                        constructed by your lapl_pyramid function.

      gauss_pyr_mask (list): A Gaussian pyramid of the mask. Each value is in
                         the range of [0, 1].

    The pyramids will have the same number of levels. Furthermore, each layer
    is guaranteed to have the same shape as previous levels.

    You should return a Laplacian pyramid that is of the same dimensions as the
    input pyramids. Every layer should be an alpha blend of the corresponding
    layers of the input pyramids, weighted by the Gaussian mask. This means the
    following computation for each layer of the pyramid:
      output[i, j] = current_mask[i, j] * white_image[i, j] +
                   (1 - current_mask[i, j]) * black_image[i, j]
    Therefore:
      Pixels where current_mask == 1 should be taken completely from the white
      image.
      Pixels where current_mask == 0 should be taken completely from the black
      image.

    Note: current_mask, white_image, and black_image are variables that refer
    to the image in the current layer we are looking at. You do this
    computation for every layer of the pyramid.
    """
    blended_pyr = []
    for lapl_white, lapl_black, gauss_mask in \
            zip(lapl_pyr_white, lapl_pyr_black, gauss_pyr_mask):
        blended_pyr.append(gauss_mask * lapl_white +
                           (1 - gauss_mask) * lapl_black)

    return blended_pyr