code: def test_from_summaries_weighted_inertia(X, w, means, covs):
      d = Normal(means, covs, covariance_type="full", inertia=0.3)
      d.summarize(X, sample_weight=w)
      d.from_summaries()
      _test_fit_params(
          d,
          [2.199091, 1.303636, 1.19],
          [
              [1.516843, 0.282174, 0.373545],
              [0.282174, 0.845669, 0.264636],
              [0.373545, 0.264636, 1.191091],
          ],
      )
  
      d = Normal(means, covs, covariance_type="full", inertia=1.0)
      d.summarize(X[:4])
      d.from_summaries()
      _test_fit_params(d, means, covs)
  
      d.summarize(X[4:])
      d.from_summaries()
      _test_fit_params(d, means, covs)
  
      d = Normal(means, covs, covariance_type="full", inertia=1.0)
      d.summarize(X)
      d.from_summaries()
      _test_fit_params(d, means, covs)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Normal
  from ._utils import _test_initialization_raises_two_parameters
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  from ._utils import _test_efd_from_summaries
  from ._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 28 for calling a global function with example usage: test_from_summaries_weighted_inertia(X, w, means, covs) without return types