code: def test_dataset_conversion_to_json():
      ds = datasets.load_dataset("rotten_tomatoes", split="train")
      mlflow_ds = mlflow.data.from_huggingface(
          ds, path="rotten_tomatoes"
      )
  
      dataset_json = mlflow_ds.to_json()
      parsed_json = json.loads(dataset_json)
      assert parsed_json.keys() <= {
          "name",
          "digest",
          "source",
          "source_type",
          "schema",
          "profile",
      }
      assert parsed_json["name"] == mlflow_ds.name
      assert parsed_json["digest"] == mlflow_ds.digest
      assert parsed_json["source"] == mlflow_ds.source.to_json()
      assert (
          parsed_json["source_type"]
          == mlflow_ds.source._get_source_type()
      )
      assert parsed_json["profile"] == json.dumps(mlflow_ds.profile)
  
      schema_json = json.dumps(
          json.loads(parsed_json["schema"])["mlflow_colspec"]
      )
      assert Schema.from_json(schema_json) == mlflow_ds.schema
  
imports: import json
  import os
  import datasets
  import pandas
  import pytest
  import mlflow.data
  import mlflow.data.huggingface_dataset
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.dataset_source_registry import get_dataset_source_from_json
  from mlflow.data.huggingface_dataset import HuggingFaceDataset
  from mlflow.data.huggingface_dataset_source import HuggingFaceDatasetSource
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.schema import Schema
  from mlflow.types.utils import _infer_schema
label_desc: Use image node_id 9 for calling a global function with example usage: test_dataset_conversion_to_json() without return types