code: def test_from_summaries_inertia(X, w, probs):
      d = Categorical(probs, inertia=0.3)
      d.summarize(X[:4])
      d.from_summaries()
      _test_fit_params(
          d,
          [
              [0.03, 0.41, 0.235, 0.325],
              [0.265, 0.205, 0.44, 0.09],
              [0.385, 0.19, 0.365, 0.06],
          ],
      )
  
      d.summarize(X[4:])
      d.from_summaries()
      _test_fit_params(
          d,
          [
              [0.242333, 0.356333, 0.303833, 0.0975],
              [0.0795, 0.7615, 0.132, 0.027],
              [0.582167, 0.057, 0.342833, 0.018],
          ],
      )
  
      d = Categorical(probs, inertia=0.3)
      d.summarize(X)
      d.from_summaries()
      _test_fit_params(
          d,
          [
              [0.13, 0.36, 0.26, 0.25],
              [0.19, 0.43, 0.29, 0.09],
              [0.51, 0.115, 0.315, 0.06],
          ],
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Categorical
  from ._utils import _test_initialization_raises_one_parameter
  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 29 for calling a global function with example usage: test_from_summaries_inertia(X, w, probs) without return types