code: def rand_im(shape, rng=None):
      if rng is None:
          rng = np.random.default_rng()
      return torch.tensor(
          rng.uniform(size=shape), dtype=torch.get_default_dtype()
      )
  
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 5 for calling a global function with example usage: rand_im(shape, rng) and returns: torch