def _generate_examples(self, files, metadata_files, split_name, add_metadata, add_labels):
        split_metadata_files = metadata_files.get(split_name, [])
        sample_empty_metadata = (
            {k: None for k in self.info.features if k != self.BASE_COLUMN_NAME} if self.info.features else {}
        )
        last_checked_dir = None
        metadata_dir = None
        metadata_dict = None
        downloaded_metadata_file = None

        metadata_ext = ""
        if split_metadata_files:
            metadata_ext = {
                os.path.splitext(original_metadata_file)[-1] for original_metadata_file, _ in split_metadata_files
            }
            metadata_ext = metadata_ext.pop()