import torch


def make_bgr_image(image, idx=0):
    """Generate visualization as tensor for a BGR image stored as a tensor"""
    vis_image = torch.zeros_like(image[idx, :, :, :])
    vis_image[0, :, :] = image[idx, 2, :, :]
    vis_image[1, :, :] = image[idx, 1, :, :]
    vis_image[2, :, :] = image[idx, 0, :, :]
    return vis_image