code: def _probabilities_to_moments(
      probabilities: List[float],
  ) -> SumOfRandomVariablesMoments:
      """Computes moments of sum of independent bernoulli random variables."""
      exp = sum(probabilities)
      var = sum([p * (1 - p) for p in probabilities])
      third_central_moment = sum(
          [p * (1 - p) * (1 - 2 * p) for p in probabilities]
      )
  
      return SumOfRandomVariablesMoments(
          len(probabilities), exp, var, third_central_moment
      )
  
imports: import abc
  import copy
  from dataclasses import dataclass
  from typing import Any, List, Optional, Tuple
  import numpy
  import math
  import pipeline_dp
  from pipeline_dp import budget_accounting
  from pipeline_dp import dp_computations
  from analysis import metrics
  from analysis import poisson_binomial
  from pipeline_dp import partition_selection
label_desc: Use image node_id 1 for calling a global function with example usage: _probabilities_to_moments(probabilities) and returns: SumOfRandomVariablesMoments