<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def heat_map(grid, name, **kwargs):
 """ Generic function for making a heat map based on the values in a grid. Arguments: grid - the grid of numbers or binary strings to be visualized. name - string indicating what the file storing the image should be called. kwargs: palette - a seaborn palette (list of RGB values) indicating how to color values. Will be converted to a continuous colormap if necessary denom - the maximum value of numbers in the grid (only used if the grid actually contains numbers). This is used to normalize values and use the full dynamic range of the color pallete. """

    denom, palette = get_kwargs(grid, kwargs)
    if "mask_zeros" in kwargs:
        mask_zeros = kwargs["mask_zeros"]
    else:
        mask_zeros = False

    grid = color_grid(grid, palette, denom, mask_zeros)
    make_imshow_plot(grid, name)