code: def test_pretransform_extract():
      spec_file = spec_dir / "vegalite" / "rect_binned_heatmap.vg.json"
      spec = json.loads(spec_file.read_text("utf8"))
  
      vf.runtime.set_connection("datafusion")
      (
          transformed,
          datasets,
          warnings,
      ) = vf.runtime.pre_transform_extract(spec, "UTC")
  
      assert len(warnings) == 0
      assert len(datasets) == 1
  
      (name, scope, table) = datasets[0]
      assert name == "source_0"
      assert scope == []
      assert isinstance(table, pa.Table)
      assert table.shape == (379, 5)
  
file_path: vegafusion/python/vegafusion/tests/test_pretransform_specs.py
imports: from pathlib import Path
  import json
  import vegafusion
  from vl_convert import vega_to_png
  from io import BytesIO
  import pyarrow
  from skimage.io import imread
  from skimage.metrics import structural_similarity
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_pretransform_extract() without return types