code: def test_dcg_series():
      "The DCG function should work on a series"
      assert _dcg(pd.Series([np.e, 0, 0, np.pi])) == approx(
          (np.e + np.pi / np.log2(4))
      )
  
imports: import numpy
  import pandas
  from pytest import approx, mark
  from lenskit.metrics.topn import _dcg, dcg, ndcg, _bulk_ndcg
  from lenskit.topn import RecListAnalysis
  from lenskit.util.test import demo_recs
label_desc: Use image node_id 9 for calling a global function with example usage: test_dcg_series() without return types