code: def test_from_summaries_inertia(X):
      d1 = Exponential([0.3])
      d2 = Exponential([0.7])
      d3 = Exponential([1.1])
  
      d = IndependentComponents([d1, d2, d3])
      d.summarize(X)
      d.from_summaries()
  
      assert_array_almost_equal(d1.scales, [2.0])
      assert_array_almost_equal(d2.scales, [1.571429], 4)
      assert_array_almost_equal(d3.scales, [0.428571], 4)
  
      d1 = Exponential([0.3], inertia=0.3)
      d2 = Exponential([0.7], inertia=0.6)
      d3 = Exponential([1.1])
  
      d = IndependentComponents([d1, d2, d3])
      d.summarize(X)
      d.from_summaries()
  
      assert_array_almost_equal(d1.scales, [1.49])
      assert_array_almost_equal(d2.scales, [1.048571], 4)
      assert_array_almost_equal(d3.scales, [0.428571], 4)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Exponential
  from pomegranate.distributions import Gamma
  from pomegranate.distributions import Categorical
  from pomegranate.distributions import IndependentComponents
  from ._utils import _test_initialization_raises_one_parameter
  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 19 for calling a global function with example usage: test_from_summaries_inertia(X) without return types