code: def preprocess(img):
      """Down samples image to resolution"""
      img = skimage.transform.resize(img, resolution)
      img = img.astype(np.float32)
      img = np.expand_dims(img, axis=0)
      return img
  
imports: import itertools
  import os
  import random
  from collections import deque
  from time import sleep, time
  import numpy
  import skimage.transform
  import torch
  import torch.nn
  import torch.optim
  from tqdm import trange
  import vizdoom
label_desc: Use image node_id 1 for calling a global function with example usage: preprocess(img) and returns: img