code: def unmold_mask_3D(mask, bbox, image_shape):
      """Converts a mask generated by the neural network into a format similar
      to it's original shape.
      mask: [height, width] of type float. A small, typically 28x28 mask.
      bbox: [y1, x1, y2, x2, z1, z2]. The box to fit the mask in.
  
      Returns a binary mask with the same size as the original image.
      """
      y1, x1, y2, x2, z1, z2 = bbox
      out_zoom = [y2 - y1, x2 - x1, z2 - z1]
      zoom_factor = [i / j for i, j in zip(out_zoom, mask.shape)]
      mask = scipy.ndimage.zoom(mask, zoom_factor, order=1).astype(
          np.float32
      )
  
      # Put the mask in the right location.
      full_mask = np.zeros(image_shape[:3])
      full_mask[y1:y2, x1:x2, z1:z2] = mask
      return full_mask
  
imports: import numpy
  import scipy.misc
  import scipy.ndimage
  import torch
  from torch.autograd import Variable
  import torch.nn
label_desc: Use image node_id 6 for calling a global function with example usage: unmold_mask_3D(mask, bbox, image_shape) and returns: full_mask