code: def _test_efd_from_summaries(d, name1, name2, values):
      for i in range(d.d):
          assert_array_almost_equal(getattr(d, name1)[i], values[i], 4)
          assert_array_almost_equal(
              getattr(d, name2)[i], numpy.log(values[i]), 2
          )
          assert_array_almost_equal(
              d._w_sum[i], numpy.zeros(d.probs[i].shape[:-1])
          )
          assert_array_almost_equal(
              d._xw_sum[i], numpy.zeros(d.probs[i].shape)
          )
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.distributions import ConditionalCategorical
  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 22 for calling a global function with example usage: _test_efd_from_summaries(d, name1, name2, values) without return types