code: def zoom_to(img, width):
      n = width // img.shape[-2] + 1
      img = img.repeat(n, axis=-3).repeat(n, axis=-2)
      r = float(width) / img.shape[-2]
      zoom = [1] * (img.ndim - 3) + [r, r, 1]
      return nd.zoom(img, zoom, order=0, mode="nearest")
  
file_path: lucid/lucid/scratch/rl_util/util.py
imports: import numpy
  import tensorflow
  import scipy.ndimage
  import lucid.optvis.render
  from lucid.misc.io.collapse_channels import hue_to_rgb
label_desc: Use image node_id 1 for calling a global function with example usage: zoom_to(img, width) and returns: nd