code: def test_pre_transform_datasets():
      n = 4050
      order_items = pd.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]
      expected = pd.DataFrame(
          {"menu_item": [0, 1, 2], "__count": [n, 2 * n, 3 * n]}
      )
      pd.testing.assert_frame_equal(result, 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 15 for calling a global function with example usage: test_pre_transform_datasets() without return types