code: def test_probabilities_to_moments(self):
      probabilities = [0.1, 0.5, 0.5, 0.2]
      moments = combiners._probabilities_to_moments(probabilities)
      self.assertAlmostEqual(4, moments.count)
      self.assertAlmostEqual(1.3, moments.expectation)
      self.assertAlmostEqual(0.75, moments.variance)
      self.assertAlmostEqual(0.168, moments.third_central_moment)
  
imports: import dataclasses
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
  from unittest.mock import patch
  from typing import Tuple
  import pipeline_dp
  from analysis import per_partition_combiners
  from analysis import metrics
  from analysis.tests import common
label_desc: Use image node_id 2 for calling the PartitionSelectionTest obj's underlying member method code with example usage: obj.test_probabilities_to_moments() without return types