code: def test_pre_transform_dataset_dataframe_interface_protocol():
      try:
          import pyarrow.interchange
      except ImportError:
          pytest.skip(
              "DataFrame interface protocol requires pyarrow 11.0.0 or later"
          )
  
      n = 4050
      # Input a polars DataFrame (which follows the DataFrame Interface Protocol)
      order_items = pl.DataFrame(
          {"menu_item": [0] * n + [1] * (2 * n) + [2] * (3 * n)}
      )
  
      vega_spec = order_items_spec()
      datasets, warnings = vf.runtime.pre_transform_datasets(
          vega_spec,
          ["data_0"],
          inline_datasets={
              "order_items": order_items,
          },
      )
      assert len(warnings) == 0
      assert len(datasets) == 1
  
      result = datasets[0]
  
      # Result should be a polars DataFrame
      assert isinstance(result, pl.DataFrame)
      expected = pl.DataFrame(
          {"menu_item": [0, 1, 2], "__count": [n, 2 * n, 3 * n]}
      )
      assert result.frame_equal(expected)
  
imports: import pandas
  import pytest
  from pandas import Timestamp, NaT
  import pyarrow
  import vegafusion
  import json
  import polars
  from datetime import date
  import decimal
  import base64
label_desc: Use image node_id 22 for calling a global function with example usage: test_pre_transform_dataset_dataframe_interface_protocol() without return types