code: def __init__(
      self,
      annotations_filepath: Union[str, Path, dict],
      img_dir: Union[str, Path],
  ):
      super().__init__(annotations_filepath, img_dir)
  
      categories = self.annotations_dict["categories"]
      self.keypoint_labels = categories[0]["keypoints"]
      for o in categories[1:]:
          if not o["keypoints"] == self.keypoint_labels:
              raise ValueError(
                  "When performing keypoint detection with multiple categories, all categories are expected to have "
                  f"the same keypoints. Found {self.keypoint_labels} for category with ID {categories[0]['id']} and "
                  f"{o['keypoints']} for category with ID {o['id']}."
              )
  
file_path: lightning-flash/src/flash/image/keypoint_detection/data.py
imports: from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Type, Union
  from flash.core.data.data_module import DataModule
  from flash.core.data.io.input import Input
  from flash.core.integrations.icevision.data import IceVisionInput
  from flash.core.utilities.imports import _ICEVISION_AVAILABLE, _TOPIC_IMAGE_AVAILABLE
  from flash.core.utilities.stages import RunningStage
  from flash.core.utilities.types import INPUT_TRANSFORM_TYPE
  from flash.image.keypoint_detection.input_transform import KeypointDetectionInputTransform
label_desc: Use image node_id 1 to create a new FlashCOCOKeyPointsParser object from inherited base classes: COCOKeyPointsParser with example: obj = FlashCOCOKeyPointsParser(annotations_filepath, img_dir)