code: def fill_UV(UV):
      mask = np.sum(UV.pixels, 0) == 0
      xx, yy = np.meshgrid(
          np.arange(UV.shape[1]), np.arange(UV.shape[0])
      )
      xym = np.vstack((np.ravel(xx[~mask]), np.ravel(yy[~mask]))).T
      data = UV.pixels[:, ~mask]
      for i in range(3):
          interp = NearestNDInterpolator(xym, data[i])
          result = interp(np.ravel(xx[mask]), np.ravel(yy[mask]))
          UV.pixels[i, mask] = result
      return UV
  
imports: import PIL.Image
  from skimage.morphology import binary_dilation, disk
  from skimage.filters import gaussian
  from scipy.interpolate import NearestNDInterpolator
  import cv2
  from utils.shading import lambertian_shading
  from menpo3d.rasterize import rasterize_mesh
  from menpo.shape import TriMesh, TexturedTriMesh, ColouredTriMesh
  from menpo.image import Image
  from utils.image_rasterization import *
  import menpo.io
  import os
  from keras.utils import get_file
  import bz2
label_desc: Use image node_id 9 for calling a global function with example usage: fill_UV(UV) and returns: UV