code: def un_normalize_batch(
      tensor: torch.Tensor,
      mean: Sized,
      std: Sized,
      max_pixel_value: int = 255,
  ):
      """Apply un-normalization on a tensor in order to display an image."""
      dim = len(mean)
      reshape_shape = (1, 1, 1, dim)
      max_pixel_value = [max_pixel_value] * dim
      mean = torch.tensor(mean, device=tensor.device).reshape(
          reshape_shape
      )
      std = torch.tensor(std, device=tensor.device).reshape(
          reshape_shape
      )
      tensor = (tensor * std) + mean
      tensor = tensor * torch.tensor(
          max_pixel_value, device=tensor.device
      ).reshape(reshape_shape)
      return object_to_numpy(tensor)
  
imports: import random
  from copy import copy
  from hashlib import md5
  from typing import Dict, Iterator, List, Sized
  import numpy
  import torch
  from PIL import Image
  from torch.utils.data import BatchSampler, DataLoader, Sampler
  from deepchecks.vision import VisionData
  from deepchecks.vision.vision_data.utils import object_to_numpy
label_desc: Use image node_id 6 for calling a global function with example usage: un_normalize_batch(tensor, mean, std, max_pixel_value) and returns: object_to_numpy