code: def test_from_summaries_inertia(X, w, probs):
      d = JointCategorical(probs, inertia=0.3)
      d.summarize(X[:4])
      d.from_summaries()
      _test_efd_from_summaries(
          d,
          "probs",
          "_log_probs",
          [
              [[0.0125, 0.2125], [0.0160, 0.0340], [0.0250, 0.0250]],
              [[0.0050, 0.0450], [0.0150, 0.0350], [0.5370, 0.0380]],
          ],
      )
  
      d.summarize(X[4:])
      d.from_summaries()
      _test_efd_from_summaries(
          d,
          "probs",
          "_log_probs",
          [
              [[0.0038, 0.0638], [0.2381, 0.0102], [0.0075, 0.0075]],
              [[0.0015, 0.0135], [0.4712, 0.0105], [0.1611, 0.0114]],
          ],
      )
  
      d = JointCategorical(probs, inertia=0.3)
      d.summarize(X)
      d.from_summaries()
      _test_efd_from_summaries(
          d,
          "probs",
          "_log_probs",
          [
              [[0.0125, 0.1375], [0.1160, 0.0340], [0.0250, 0.0250]],
              [[0.0050, 0.0450], [0.2150, 0.0350], [0.3120, 0.0380]],
          ],
      )
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.distributions import JointCategorical
  from ._utils import _test_initialization_raises_one_parameter
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  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 25 for calling a global function with example usage: test_from_summaries_inertia(X, w, probs) without return types