code: def to_numpy(img_tensor: torch.Tensor) -> np.ndarray:
      # [0, 1] --> [0, 255]
      img_tensor = torch.mul(img_tensor, 255.0)
      # BCHW --> BHWC
      img_tensor = img_tensor.permute(0, 2, 3, 1)
  
      img_np = img_tensor.byte().cpu().numpy()
      return img_np
  
file_path: ml-cvnets/utils/tensor_utils.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from torch import distributed
  from common import DEFAULT_IMAGE_CHANNELS, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, DEFAULT_VIDEO_FRAMES
  from utils.third_party.ddp_functional_utils import all_gather
label_desc: Use image node_id 9 for calling a global function with example usage: to_numpy(img_tensor) and returns: img_np