code: def test_fit_chain(X):
      d = Gamma().fit(X[:4])
      _test_fit_params(
          d,
          [2.599745, 1.681025, 3.453269],
          [1.704751, 1.222564, 2.227916],
          [1.029533, 0.437424, 1.616514],
      )
  
      d.fit(X[4:])
      _test_fit_params(
          d,
          [7.692329, 14.423422, 0.571159],
          [2.097908, 10.302444, 0.389426],
          [-2.211836, 9.980053, -0.98287],
      )
  
      d = Gamma().fit(X)
      _test_fit_params(
          d,
          [2.231407, 2.637839, 1.037289],
          [0.913442, 1.903595, 0.685002],
          [-0.316346, 1.31193, -0.372041],
      )
  
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 38 for calling a global function with example usage: test_fit_chain(X) without return types