def _load_data_map(data_path, ignore_exts=False, recursive=False):
        """Helper function that parses either a data directory or a data
        manifest file into a UUID -> filepath map.
        """
        if ignore_exts:
            to_uuid = lambda p: fos.normpath(os.path.splitext(p)[0])
        else:
            to_uuid = lambda p: fos.normpath(p)

        if isinstance(data_path, dict):
            return {to_uuid(k): fos.normpath(v) for k, v in data_path.items()}

        if not data_path:
            return {}

        if data_path.endswith(".json"):
            if not os.path.isfile(data_path):
                raise ValueError(
                    "Data manifest '%s' does not exist" % data_path
                )

            data_map = etas.read_json(data_path)
            data_root = os.path.dirname(data_path)
            return {
                to_uuid(k): fos.normpath(os.path.join(data_root, v))
                for k, v in data_map.items()
            }

        if not os.path.isdir(data_path):
            raise ValueError("Data directory '%s' does not exist" % data_path)

        return {
            to_uuid(p): fos.normpath(os.path.join(data_path, p))
            for p in etau.list_files(data_path, recursive=recursive)
        }
Helper function that parses either a data directory or a data
        manifest file into a UUID -> filepath map.
        
fiftyone/utils/data/importers.py