code: def test_pipeline():
      pipeline = ds.Pipeline(df, ds.Point("x", "y"))
      img = pipeline((0, 1), (0, 1), 2, 2)
      agg = cvs.points(df, "x", "y", ds.count())
      assert img.equals(tf.shade(agg))
  
      def color_fn(agg):
          return tf.shade(agg, "pink", "red")
  
      pipeline.color_fn = color_fn
      img = pipeline((0, 1), (0, 1), 2, 2)
      assert img.equals(color_fn(agg))
  
      def transform_fn(agg):
          return agg + 1
  
      pipeline.transform_fn = transform_fn
      img = pipeline((0, 1), (0, 1), 2, 2)
      assert img.equals(color_fn(transform_fn(agg)))
  
      pipeline = ds.Pipeline(df, ds.Point("x", "y"), ds.sum("f64"))
      img = pipeline((0, 1), (0, 1), 2, 2)
      agg = cvs.points(df, "x", "y", ds.sum("f64"))
      assert img.equals(tf.shade(agg))
  
file_path: datashader/datashader/tests/test_pipeline.py
imports: from __future__ import annotations
  import numpy
  import pandas
  import pytest
  import datashader
  import datashader.transfer_functions
label_desc: Use image node_id 1 for calling a global function with example usage: test_pipeline() and returns: tf, unknown