code: def test_gmm_summarize(gmm, X, priors):
      gmm.summarize(X, priors=priors)
  
      assert_array_almost_equal(gmm._w_sum, [4.497087, 6.502913], 4)
  
      assert_array_almost_equal(
          gmm.distributions[0]._w_sum, [4.497087, 4.497087, 4.497087], 4
      )
      assert_array_almost_equal(
          gmm.distributions[0]._xw_sum, [5.390766, 4.999861, 1.02639], 4
      )
  
      assert_array_almost_equal(
          gmm.distributions[1]._w_sum, [6.502912, 6.502912, 6.502912], 4
      )
      assert_array_almost_equal(
          gmm.distributions[1]._xw_sum,
          [10.609234, 6.000139, 10.97361],
          4,
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.gmm import GeneralMixtureModel
  from pomegranate.hmm import DenseHMM
  from pomegranate.distributions import Exponential
  from nose.tools import assert_raises
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 18 for calling a global function with example usage: test_gmm_summarize(gmm, X, priors) without return types