code: def test_pre_transform_dataset_duckdb_with_decimal_conn():
      import duckdb
  
      n = 4050
      # Input a polars DataFrame (which follows the DataFrame Interface Protocol)
      order_items = pd.DataFrame(
          {"menu_item_int": [0] * n + [1] * (2 * n) + [2] * (3 * n)}
      )
  
      try:
          # Create duckdb connection and register order_items with duckdb
          conn = duckdb.connect()
          conn.register("order_items_int", order_items)
          conn.query(
              "SELECT menu_item_int::DECIMAL(12,2) as menu_item from order_items_int"
          ).to_view("order_items")
  
          # Set this as the active connection
          vf.runtime.set_connection(conn)
  
          # order_items includes a table://order_items data url
          vega_spec = order_items_spec()
          datasets, warnings = vf.runtime.pre_transform_datasets(
              vega_spec,
              ["data_0"],
          )
          assert len(warnings) == 0
          assert len(datasets) == 1
  
          result = datasets[0]
          expected = pd.DataFrame(
              {
                  "menu_item": [
                      decimal.Decimal(0),
                      decimal.Decimal(1),
                      decimal.Decimal(2),
                  ],
                  "__count": [n, 2 * n, 3 * n],
              }
          )
          pd.testing.assert_frame_equal(result, expected)
      finally:
          vf.runtime.set_connection("datafusion")
  
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 24 for calling a global function with example usage: test_pre_transform_dataset_duckdb_with_decimal_conn() without return types