code: def create_random_image(shape, rng: Optional[Generator] = None):
      if rng is None:
          rng = np.random.default_rng()
      img = rng.random(shape)
      img = (255.0 / img.max() * (img - img.min())).astype(np.uint8)
      res = img.astype(np.float32) / 255
      return res
  
file_path: NeuralCompression/tests/utils.py
imports: from pathlib import Path
  from typing import Optional
  import numpy
  import torch
  from numpy.random import Generator
  from PIL import Image
label_desc: Use image node_id 3 for calling a global function with example usage: create_random_image(shape, rng) and returns: res