def _2D_ticks(x_num_ticks, y_num_ticks, env_config, type_):
    """
    Generates the tick labels for the heatmap on a 2D-state environment

    Parameters
    ----------
    num_ticks : int
        The total number of ticks along the axis
    env_config : dict
        The environment configuration file as a dict
    type_ : str
        The type of plot to get the ticks of the heatmap for, one of 'state',
        'action'

    Returns
    -------
    2-tuple of func
        The function to generate the x tick labels and the function to
        generate the y tick labels
    """
    if type_ == "state":
        ymin, xmin = env_config["state_low"]
        ymax, xmax = env_config["state_high"]
    else:
        ymin, xmin = 0.0, env_config["action_low"][0]
        ymax, xmax = 0.0, env_config["action_high"][0]

    def xtick(x, pos):
        if pos == 0:
            return "{:.2f}".format(xmin)
        elif pos == x_num_ticks - 1:
            return "{:.2f}".format(xmax)
        elif pos == x_num_ticks - (x_num_ticks // 2):
            return "{:.1f}".format((xmax + xmin) / 2)
        else:
            return ""

    def ytick(x, pos):
        if pos == 0:
            return "{:.2f}".format(ymin)
        elif pos == y_num_ticks - 1:
            return "{:.2f}".format(ymax)
        elif pos == y_num_ticks - (y_num_ticks // 2):
            return "{:.1f}".format((ymax + ymin) / 2)
        else:
            return ""

    return xtick, ytick