def ingest_columns(self):
        """Ingest all data into the dataset"""
        for img_id in progress_bar(self.img_ids):
            img_coco = self.coco_instances[self.first_key].loadImgs(img_id)[0]
            img_path = os.path.join(self.images_directory, img_coco["file_name"])

            with open(img_path, "rb") as file:
                image_bytes = file.read()

            in_dict = {
                "images": [image_bytes],
                "images_meta": [img_coco],
            }

            for file_key, group_name in self.file_to_group_mapping.items():
                if file_key not in self.annotation_files:
                    continue

                coco = self.coco_instances[file_key]
                ann_ids = coco.getAnnIds(img_id)
                anns = coco.loadAnns(ann_ids)

                height, width = img_coco["height"], img_coco["width"]

                group_data = self.get_group_data(
                    height,
                    width,
                    anns,
                    file_key,
                    has_keypoints=self.has_keypoints(group_name),
                )

                prefix = f"{group_name}/" if group_name else ""
                for key, value in group_data.items():
                    tensor_name = self.key_to_column_mapping.get(key, key)
                    in_dict[f"{prefix}{tensor_name}"] = [value]

            self.dataset.append(in_dict)

        self.dataset.commit("Finished ingestion")
Ingest all data into the dataset
python/deeplake/ingestion/coco/from_coco.py