code: def test_from_summaries_inertia(X, w, shapes, rates):
      d = Gamma(shapes, rates, inertia=0.3)
      d.summarize(X[:4])
      d.from_summaries()
      _test_fit_params(
          d,
          [2.179822, 1.716718, 3.047288],
          [1.283326, 1.785795, 1.919541],
          [0.457686, 1.087673, 1.249872],
      )
  
      d.summarize(X[4:])
      d.from_summaries()
      _test_fit_params(
          d,
          [6.038577, 10.611411, 1.313998],
          [1.853533, 7.747449, 0.848461],
          [-1.127075, 7.527596, -0.105499],
      )
  
      d = Gamma(shapes, rates, inertia=0.3)
      d.summarize(X)
      d.from_summaries()
      _test_fit_params(
          d,
          [1.921985, 2.386487, 1.356102],
          [0.729409, 2.262517, 0.839501],
          [-0.575438, 1.74043, -0.12133],
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Gamma
  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 31 for calling a global function with example usage: test_from_summaries_inertia(X, w, shapes, rates) without return types