code: def test_facet_parse_data():
      data = pd.DataFrame(
          {"x": range(5), "y": range(5), "row": list("abcab")}
      )
      chart = (
          alt.Chart(data)
          .mark_point()
          .encode(x="x", y="y:O")
          .facet(row="row", column="column:O")
      )
      with alt.data_transformers.enable(consolidate_datasets=False):
          dct = chart.to_dict()
      assert "values" in dct["data"]
      assert "data" not in dct["spec"]
      assert dct["facet"] == {
          "column": {"field": "column", "type": "ordinal"},
          "row": {"field": "row", "type": "nominal"},
      }
  
      with alt.data_transformers.enable(consolidate_datasets=True):
          dct = chart.to_dict()
      assert "datasets" in dct
      assert "name" in dct["data"]
      assert "data" not in dct["spec"]
      assert dct["facet"] == {
          "column": {"field": "column", "type": "ordinal"},
          "row": {"field": "row", "type": "nominal"},
      }
  
imports: import io
  import json
  import operator
  import os
  import pathlib
  import tempfile
  import jsonschema
  import pytest
  import pandas
  import altair.vegalite.v5
label_desc: Use image node_id 15 for calling a global function with example usage: test_facet_parse_data() without return types