def from_coco(
    images_directory: Union[str, pathlib.Path],
    annotation_files: Dict[str, Union[str, pathlib.Path]],
    dest: Union[str, pathlib.Path],
    dest_creds: Optional[Dict[str, str]] = None,
    key_to_column_mapping: Optional[Dict] = None,
    file_to_group_mapping: Optional[Dict] = None,
) -> dp.Dataset:
    """Ingest images and annotations in COCO format to a Deep Lake Dataset. The source data can be stored locally or in the cloud.

    Args:
        images_directory (str, pathlib.Path): The path to the directory containing images.
        annotation_files Dict(str, Union[str, pathlib.Path]): dictionary from key to path to JSON annotation file in COCO format.
            - the required keys are the following `instances`, `keypoints` and `stuff`
        dest (str, pathlib.Path):
            - The full path to the dataset. Can be:
            - a Deep Lake cloud path of the form ``al://org_id/datasetname``. To write to Deep Lake cloud datasets, ensure that you are authenticated to Deep Lake (pass in a token using the 'token' parameter).
            - an s3 path of the form ``s3://bucketname/path/to/dataset``. Credentials are required in either the environment or passed to the creds argument.
            - a local file system path of the form ``./path/to/dataset`` or ``~/path/to/dataset`` or ``path/to/dataset``.
            - a memory path of the form ``mem://path/to/dataset`` which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist.
        dest_creds (Optional[Dict[str, str]]): The dictionary containing credentials used to access the destination path of the dataset.
        key_to_column_mapping (Optional[Dict]): A one-to-one mapping between COCO keys and Dataset column names.
        file_to_group_mapping (Optional[Dict]): A one-to-one mapping between COCO annotation file names and Dataset group names.

    Returns:
        Dataset: The Dataset created from images and COCO annotations.

    Raises:
        CocoAnnotationMissingError: If one or many annotation key is missing from file.
    """

    dest = convert_pathlib_to_string_if_needed(dest)
    images_directory = standartize_path(
        convert_pathlib_to_string_if_needed(images_directory)
    )

    annotation_files = verify_coco_annotation_dict(annotation_files)

    dist_ds = dp.create(dest, dict(dest_creds) if dest_creds is not None else {})

    unstructured = COCOStructuredDataset(
        dataset=dist_ds,
        images_directory=images_directory,
        annotation_files=annotation_files,
        key_to_column_mapping=key_to_column_mapping,
        file_to_group_mapping=file_to_group_mapping,
    )

    unstructured.structure()

    return dist_ds
Ingest images and annotations in COCO format to a Deep Lake Dataset. The source data can be stored locally or in the cloud.

    Args:
        images_directory (str, pathlib.Path): The path to the directory containing images.
        annotation_files Dict(str, Union[str, pathlib.Path]): dictionary from key to path to JSON annotation file in COCO format.
            - the required keys are the following `instances`, `keypoints` and `stuff`
        dest (str, pathlib.Path):
            - The full path to the dataset. Can be:
            - a Deep Lake cloud path of the form ``al://org_id/datasetname``. To write to Deep Lake cloud datasets, ensure that you are authenticated to Deep Lake (pass in a token using the 'token' parameter).
            - an s3 path of the form ``s3://bucketname/path/to/dataset``. Credentials are required in either the environment or passed to the creds argument.
            - a local file system path of the form ``./path/to/dataset`` or ``~/path/to/dataset`` or ``path/to/dataset``.
            - a memory path of the form ``mem://path/to/dataset`` which doesn't save the dataset but keeps it in memory instead. Should be used only for testing as it does not persist.
        dest_creds (Optional[Dict[str, str]]): The dictionary containing credentials used to access the destination path of the dataset.
        key_to_column_mapping (Optional[Dict]): A one-to-one mapping between COCO keys and Dataset column names.
        file_to_group_mapping (Optional[Dict]): A one-to-one mapping between COCO annotation file names and Dataset group names.

    Returns:
        Dataset: The Dataset created from images and COCO annotations.

    Raises:
        CocoAnnotationMissingError: If one or many annotation key is missing from file.
    
python/deeplake/ingestion/coco/from_coco.py