code: def test_dataset_config_json_deprecated(
      feedback_dataset_fields: List["AllowedFieldTypes"],
      feedback_dataset_questions: List["AllowedQuestionTypes"],
      feedback_dataset_guidelines: str,
  ) -> None:
      config = DeprecatedDatasetConfig(
          fields=feedback_dataset_fields,
          questions=feedback_dataset_questions,
          guidelines=feedback_dataset_guidelines,
      )
      assert isinstance(config, DeprecatedDatasetConfig)
      assert config.fields == feedback_dataset_fields
      assert config.questions == feedback_dataset_questions
      assert config.guidelines == feedback_dataset_guidelines
  
      with pytest.warns(
          DeprecationWarning,
          match="`DatasetConfig` can just be dumped to YAML",
      ):
          to_json_config = config.to_json()
      assert isinstance(to_json_config, str)
      assert all(
          f'"name": "{field.name}"' in to_json_config
          for field in feedback_dataset_fields
      )
      assert all(
          f'"name": "{question.name}"' in to_json_config
          for question in feedback_dataset_questions
      )
      assert (
          f'"guidelines": "{feedback_dataset_guidelines}"'
          in to_json_config
      )
  
      with pytest.warns(
          DeprecationWarning,
          match="`DatasetConfig` can just be loaded from YAML",
      ):
          from_json_config = config.from_json(to_json_config)
      assert isinstance(from_json_config, DeprecatedDatasetConfig)
      assert from_json_config.fields == feedback_dataset_fields
      assert from_json_config.questions == feedback_dataset_questions
      assert from_json_config.guidelines == feedback_dataset_guidelines
  
file_path: argilla/tests/unit/client/feedback/test_config.py
imports: import json
  import re
  from typing import TYPE_CHECKING, Any, Dict, List
  import pytest
  from argilla.client.feedback.config import DatasetConfig, DeprecatedDatasetConfig
  from argilla.client.feedback.schemas.fields import FieldSchema
  from argilla.client.feedback.schemas.questions import QuestionSchema
  from yaml import SafeLoader, load
label_desc: Use image node_id 2 for calling a global function with example usage: test_dataset_config_json_deprecated(feedback_dataset_fields, feedback_dataset_questions, feedback_dataset_guidelines) without return types