def vertical_value(coord_x, coord_y, grid):
    """Return the product of 4 vertically adjacent cells in a dictionary."""
    try:
        product = (grid[(coord_x, coord_y)] * grid[(coord_x, coord_y + 1)] *
                   grid[(coord_x, coord_y + 2)] * grid[(coord_x, coord_y + 3)])
    except KeyError:
        return 0

    return product