def METHOD_NAME(self, heatmap: Tensor, apply_sigmoid: bool, dsize, min_value=None, max_value=None, colormap=cv2.COLORMAP_JET):
    if apply_sigmoid:
        heatmap = heatmap.sigmoid()
    if min_value is None:
        min_value = heatmap.min().item()
    if max_value is None:
        max_value = heatmap.max().item()
    heatmap = heatmap.detach().cpu().numpy()
    real_min = heatmap.min()
    real_max = heatmap.max()
    heatmap = np.max(heatmap, axis=0)
    heatmap = (heatmap - min_value) / (1e-8 + max_value - min_value)
    heatmap = np.clip(heatmap, 0, 1)
    heatmap_8u = (heatmap * 255).astype(np.uint8)
    heatmap_bgr = cv2.applyColorMap(heatmap_8u, colormap)
    heatmap_rgb = cv2.cvtColor(heatmap_bgr, cv2.COLOR_BGR2RGB)
    if dsize is not None:
        heatmap_rgb = cv2.resize(heatmap_rgb, dsize=dsize)
    cv2.putText(
        heatmap_rgb,
        f"min:{real_min:.3f}",
        (5, 15),
        fontFace=cv2.FONT_HERSHEY_PLAIN,
        color=(255, 255, 255),
        fontScale=0.8,
        thickness=1,
        lineType=cv2.LINE_AA,
    )
    cv2.putText(
        heatmap_rgb,
        f"max:{real_max:.3f}",
        (5, heatmap_rgb.shape[0] - 10),
        cv2.FONT_HERSHEY_PLAIN,
        color=(255, 255, 255),
        fontScale=0.8,
        thickness=1,
        lineType=cv2.LINE_AA,
    )
    return heatmap, heatmap_rgb