code: def __call__(self, data):
      d = dict(data)
      location = d.get("location", [0, 0])
      size = d.get("size", [0, 0])
      min_poly_area = d.get("min_poly_area", self.min_poly_area)
      max_poly_area = d.get("max_poly_area", self.max_poly_area)
      color_map = (
          d.get(self.key_label_colors)
          if self.colormap is None
          else self.colormap
      )
  
      foreground_points = (
          d.get(self.key_foreground_points, [])
          if self.key_foreground_points
          else []
      )
      foreground_points = [
          Point(pt[0], pt[1]) for pt in foreground_points
      ]  # polygons in (x, y) format
  
      elements = []
      label_names = set()
      for key in self.keys:
          p = d[key]
          if np.count_nonzero(p) < self.min_positive:
              continue
  
          labels = [
              label for label in np.unique(p).tolist() if label > 0
          ]
          logger.debug(
              f"Total Unique Masks (excluding background): {labels}"
          )
          for label_idx in labels:
              p = (
                  convert_to_numpy(d[key])
                  if isinstance(d[key], torch.Tensor)
                  else d[key]
              )
              p = np.where(p == label_idx, 1, 0).astype(np.uint8)
              p = np.moveaxis(p, 0, 1)  # for cv2
  
              label_name = self.labels.get(label_idx, label_idx)
              label_names.add(label_name)
  
              polygons = []
              contours, _ = cv2.findContours(
                  p, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE
              )
              for contour in contours:
                  if len(contour) < 3:
                      continue
  
                  contour = np.squeeze(contour)
                  area = cv2.contourArea(contour)
                  if (
                      area < min_poly_area
                  ):  # Ignore poly with lesser area
                      continue
                  if (
                      0 < max_poly_area < area
                  ):  # Ignore very large poly (e.g. in case of nuclei)
                      continue
  
                  contour[:, 0] += location[0]  # X
                  contour[:, 1] += location[1]  # Y
  
                  coords = contour.astype(int).tolist()
                  if foreground_points:
                      for pt in foreground_points:
                          if Polygon(coords).contains(pt):
                              polygons.append(coords)
                              break
                  else:
                      polygons.append(coords)
  
              if len(polygons):
                  logger.debug(
                      f"+++++ {label_idx} => Total Polygons Found: {len(polygons)}"
                  )
                  elements.append(
                      {"label": label_name, "contours": polygons}
                  )
  
      if elements:
          if d.get(self.result) is None:
              d[self.result] = dict()
          d[self.result][self.result_output_key] = {
              "location": location,
              "size": size,
              "elements": elements,
              "labels": {
                  n: get_color(n, color_map) for n in label_names
              },
          }
          logger.debug(
              f"+++++ ALL => Total Annotation Elements Found: {len(elements)}"
          )
      return d
  
imports: import logging
  from typing import Dict, Hashable, Mapping, Optional, Sequence, Union
  import cv2
  import nibabel
  import numpy
  import skimage.measure
  import torch
  from monai.config import KeysCollection, NdarrayOrTensor
  from monai.data import MetaTensor
  from monai.transforms import MapTransform, Orientation, Resize, Transform, generate_spatial_bounding_box, get_extreme_points
  from monai.utils import InterpolateMode, convert_to_numpy, ensure_tuple_rep
  from shapely.geometry import Point, Polygon
  from torchvision.utils import make_grid, save_image
  from monailabel.utils.others.label_colors import get_color
label_desc: Use image node_id 2 for calling the FindContoursd obj's underlying member method code with example usage: obj.__call__(data) and returns: d