f"One or several metadata{metadata_ext} were found, but not in the same directory or in a parent directory of {downloaded_dir_file}."
                                )
                        else:
                            sample_metadata = {}
                        if add_labels:
                            sample_label = {"label": os.path.basename(os.path.dirname(downloaded_dir_file))}
                        else:
                            sample_label = {}
                        yield (
                            file_idx,
                            {
                                **sample_empty_metadata,
                                self.BASE_COLUMN_NAME: downloaded_dir_file,
                                **sample_metadata,
                                **sample_label,
                            },
                        )
                        file_idx += 1