code: def test_metadata_configs_dataset_card_data(
      readme_content,
      expected_metadata_configs_dict,
      expected_default_config_name,
  ):
      with tempfile.TemporaryDirectory() as tmp_dir:
          path = Path(tmp_dir) / "README.md"
          with open(path, "w+") as readme_file:
              readme_file.write(readme_content)
          dataset_card_data = DatasetCard.load(path).data
          metadata_configs_dict = (
              MetadataConfigs.from_dataset_card_data(dataset_card_data)
          )
          assert metadata_configs_dict == expected_metadata_configs_dict
          assert (
              metadata_configs_dict.get_default_config_name()
              == expected_default_config_name
          )
  
file_path: datasets/tests/test_metadata_util.py
imports: import re
  import sys
  import tempfile
  import unittest
  from pathlib import Path
  import pytest
  import yaml
  from huggingface_hub import DatasetCard, DatasetCardData
  from datasets.config import METADATA_CONFIGS_FIELD
  from datasets.info import DatasetInfo
  from datasets.utils.metadata import MetadataConfigs
label_desc: Use image node_id 3 for calling a global function with example usage: test_metadata_configs_dataset_card_data(readme_content, expected_metadata_configs_dict, expected_default_config_name) without return types