code: def ochuman_ds(samples_source) -> Tuple[Dataset, Dataset]:
      class OCHumanParser(Parser):
          def __init__(self, annotations_filepath, img_dir):
              self.annotations_dict = json.loads(
                  Path(annotations_filepath).read_bytes()
              )
              self.img_dir = Path(img_dir)
              self.class_map = ClassMap(["person"])
              super().__init__(template_record=self.template_record())
  
          def __iter__(self):
              yield from self.annotations_dict["images"]
  
          def __len__(self):
              return len(self.annotations_dict["images"])
  
          def template_record(self):
              return BaseRecord(
                  (
                      FilepathRecordComponent(),
                      KeyPointsRecordComponent(),
                      InstancesLabelsRecordComponent(),
                      BBoxesRecordComponent(),
                  )
              )
  
          def record_id(self, o):
              return int(o["image_id"])
  
          def parse_fields(self, o, record: BaseRecord, is_new) -> None:
              record.set_filepath(self.filepath(o))
              record.set_img_size(self.img_size(o))
  
              record.detection.set_class_map(self.class_map)
              record.detection.add_labels(self.labels(o))
              record.detection.add_bboxes(self.bboxes(o))
              record.detection.add_keypoints(self.keypoints(o))
  
          def filepath(self, o):
              return self.img_dir / o["file_name"]
  
          def keypoints(self, o):
              return [
                  KeyPoints.from_xyv(
                      kps["keypoints"], OCHumanKeypointsMetadata
                  )
                  for kps in o["annotations"]
                  if kps["keypoints"] is not None
              ]
  
          def img_size(self, o) -> Tuple[int, int]:
              return get_img_size(self.filepath(o))
  
          def labels(self, o) -> List[Hashable]:
              return [
                  "person"
                  for ann in o["annotations"]
                  if ann["keypoints"] is not None
              ]
  
          def bboxes(self, o) -> List[BBox]:
              return [
                  BBox.from_xyxy(*ann["bbox"])
                  for ann in o["annotations"]
                  if ann["keypoints"] is not None
              ]
  
      parser = OCHumanParser(
          samples_source / "ochuman/annotations/ochuman.json",
          samples_source / "ochuman/images/",
      )
      train_records, valid_records = parser.parse(
          data_splitter=RandomSplitter([0.8, 0.2])
      )
  
      presize = 64
      size = 32
  
      valid_tfms = tfms.A.Adapter(
          [*tfms.A.resize_and_pad(size), tfms.A.Normalize()]
      )
      train_tfms = tfms.A.Adapter(
          [
              *tfms.A.aug_tfms(
                  size=size, presize=presize, crop_fn=None
              ),
              tfms.A.Normalize(),
          ]
      )
  
      train_ds = Dataset(train_records, train_tfms)
      valid_ds = Dataset(valid_records, valid_tfms)
  
      return train_ds, valid_ds
  
imports: import pytest
  from icevision import *
  from icevision.imports import *
  from icevision.models.torchvision import faster_rcnn, keypoint_rcnn
  from icevision.models.ross import efficientdet
  from icevision.models.ross.efficientdet.backbones import *
  import albumentations
label_desc: Use image node_id 24 for calling a global function with example usage: ochuman_ds(samples_source) and returns: train_ds,  valid_ds, len, BaseRecord, int, unknown, unknown, get_img_size, unknown, unknown