code: def isolate_sprite(image_region_path, output_file_path):
      result_image = None
  
      for root, directories, files in os.walk(image_region_path):
          for file in files:
              if not file.endswith(".png"):
                  continue
  
              image = skimage.io.imread(f"{root}/{file}")
              image = np.concatenate(
                  (
                      image,
                      np.full(
                          (image.shape[0], image.shape[1], 1),
                          255,
                          dtype="uint8",
                      ),
                  ),
                  axis=2,
              )
  
              if result_image is None:
                  result_image = image
              else:
                  height, width, rgba = image.shape
  
                  for i in range(height):
                      for ii in range(width):
                          if not np.array_equal(
                              image[i, ii, :2], result_image[i, ii, :2]
                          ):
                              result_image[i, ii, 3] = 0
  
      skimage.io.imsave(output_file_path, result_image)
  
imports: import numpy
  import skimage.io
  import skimage.util
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: isolate_sprite(image_region_path, output_file_path) without return types