def METHOD_NAME(self):
    with tempfile.TemporaryDirectory() as tmp_dir:
        path = Path(tmp_dir) / "README.md"
        with open(path, "w+") as readme_file:
            readme_file.write(README_YAML)
        dataset_card_data = DatasetCard.load(path).data
        self.assertDictEqual(
            dataset_card_data.to_dict(), {"language": ["zh", "en"], "task_ids": ["sentiment-classification"]}
        )
        with open(path, "w+") as readme_file:
            readme_file.write(README_EMPTY_YAML)
        if (
            sys.platform != "win32"
        ):  # there is a bug on windows, see https://github.com/huggingface/huggingface_hub/issues/1546
            dataset_card_data = DatasetCard.load(path).data
            self.assertDictEqual(dataset_card_data.to_dict(), {})
        with open(path, "w+") as readme_file:
            readme_file.write(README_NO_YAML)
        dataset_card_data = DatasetCard.load(path).data
        self.assertEqual(dataset_card_data.to_dict(), {})