code: def connected_components_gpu(
      image: Tensor, num_iterations: int = 1000
  ) -> Tensor:
      """Perform connected component labeling on GPU and remap the labels from 0 to N.
  
      Args:
          image (Tensor): Binary input image from which we want to extract connected components (Bx1xHxW)
          num_iterations (int): Number of iterations used in the connected component computation.
  
      Returns:
          Tensor: Components labeled from 0 to N.
      """
      components = connected_components(
          image, num_iterations=num_iterations
      )
  
      # remap component values from 0 to N
      labels = components.unique()
      for new_label, old_label in enumerate(labels):
          components[components == old_label] = new_label
  
      return components.int()
  
imports: import cv2
  import numpy
  import torch
  from kornia.contrib import connected_components
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: connected_components_gpu(image, num_iterations) and returns: components