code: def test_popmon_pipeline(test_pipeline):
      datastore = {
          "x": np.array([7, 2, 7, 9, 6]),
          "weights": np.array([1, 1, 2, 1, 2]),
      }
      expected_result = np.sum(
          np.power(np.log(datastore["x"]), 2) * datastore["weights"]
      ) / np.sum(datastore["weights"])
  
      np.testing.assert_array_almost_equal(
          test_pipeline.transform(datastore)["res"],
          expected_result,
          decimal=12,
      )
  
imports: import logging
  import numpy
  import pytest
  from popmon.base import Module, Pipeline
label_desc: Use image node_id 2 for calling a global function with example usage: test_popmon_pipeline(test_pipeline) without return types