code: def transparent_to_white(image):
      # If alpha transparency
      if len(image.shape) <= 2:
          return image
  
      if image.shape[2] == 4:
          # convert transparent to white
          alpha_channel = image[:, :, 3]
          _, mask = cv.threshold(
              alpha_channel, 254, 255, cv.THRESH_BINARY
          )  # binarize mask
          color = image[:, :, :3]
          image = cv.bitwise_not(
              cv.bitwise_not(color, mask=np.uint8(mask))
          )
  
      return image
  
file_path: doc-parsr/server/assets/ImageCorrection.py
imports: from __future__ import print_function
  import numpy
  import cv2
  import json
  import math
  from pathlib import Path
  import re
  import os
  import sys
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: transparent_to_white(image) and returns: image, image