code: def test_count(source):
      out = xr.DataArray(
          np.array([[5, 5], [5, 5]], dtype="i4"),
          coords=coords,
          dims=dims,
      )
      assert_eq(c.points(source, "x", "y", ds.count("i32")), out)
      assert_eq(c.points(source, "x", "y", ds.count("i64")), out)
      assert_eq(c.points(source, "x", "y", ds.count()), out)
      assert_eq(c.points(source, "x", "y", ds.count("value")), out)
      out = xr.DataArray(
          np.array([[4, 5], [5, 5]], dtype="i4"),
          coords=coords,
          dims=dims,
      )
      assert_eq(c.points(source, "x", "y", ds.count("f32")), out)
  
      agg = c.points(source, "x", "y", ds.count("f64"))
      assert_eq(agg, out)
      np.testing.assert_array_almost_equal(agg.x_range, (0, 1))
      np.testing.assert_array_almost_equal(agg.y_range, (0, 1))
  
file_path: datashader/datashader/tests/test_xarray.py
imports: from __future__ import annotations
  import numpy
  from numpy import nan
  import os
  import xarray
  import datashader
  from datashader.tests.test_pandas import assert_eq_ndarray
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_count(source) without return types