def delete_project(
        self, project_id, delete_batches=False, delete_ontologies=True
    ):
        """Deletes the given project from the Labelbox server.

        Args:
            project_id: the project ID
            delete_batches (False): whether to delete the attached batches as
                well
            delete_ontologies (True): whether to delete the attached
                ontologies as well
        """
        project = self._client.get_project(project_id)

        logger.info("Deleting project '%s'...", project_id)

        if delete_batches:
            for batch in project.batches():
                batch.delete_labels()
                if self.export_version != LabelboxExportVersion.V1:
                    lb.DataRow.bulk_delete(
                        data_rows=list(
                            batch.export_data_rows(include_metadata=False)
                        )
                    )
                batch.delete()

        ontology = project.ontology()

        project.delete()

        if delete_ontologies and ontology is not None:
            self._client.delete_unused_ontology(ontology.uid)
Deletes the given project from the Labelbox server.

        Args:
            project_id: the project ID
            delete_batches (False): whether to delete the attached batches as
                well
            delete_ontologies (True): whether to delete the attached
                ontologies as well
        
fiftyone/utils/labelbox.py