def _parse_data_path(
        export_dir=None,
        data_path=None,
        export_media=None,
        default=None,
    ):
        """Helper function that computes default values for the ``data_path``
        and ``export_media`` parameters supported by many exporters.
        """
        if data_path is None:
            if export_media == "manifest" and default is not None:
                data_path = fos.normalize_path(default) + ".json"
            elif export_dir is not None:
                data_path = default

        if data_path is not None:
            data_path = os.path.expanduser(data_path)

            if not os.path.isabs(data_path) and export_dir is not None:
                export_dir = fos.normalize_path(export_dir)
                data_path = os.path.join(export_dir, data_path)

        if export_media is None:
            if data_path is None:
                export_media = False
            elif data_path.endswith(".json"):
                export_media = "manifest"
            else:
                export_media = True

        return data_path, export_media
Helper function that computes default values for the ``data_path``
        and ``export_media`` parameters supported by many exporters.
        
fiftyone/utils/data/exporters.py