code: def test_hawkes_em_kernel_shape(self):
      kernel_support = 4
      kernel_size = 10
      em = HawkesEM(
          kernel_support=kernel_support,
          kernel_size=kernel_size,
          n_threads=2,
          max_iter=11,
          verbose=False,
      )
      em.fit(self.events)
      reshaped_kernel = em._flat_kernels.reshape(
          (em.n_nodes, em.n_nodes, em.kernel_size)
      )
      self.assertTrue(
          np.allclose(em.kernel, reshaped_kernel),
          "Reshaping of kernel is inconsistent:"
          f"kernel: {em.kernel}\n"
          f"reshaped kernel: {reshaped_kernel}\n",
      )
  
imports: import unittest
  import numpy
  from tick.hawkes.inference import HawkesEM
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_intensities, hawkes_log_likelihood
  from tick.hawkes import SimuHawkes, HawkesKernelTimeFunc, HawkesKernelExp, SimuHawkesExpKernels
  from tick.base import TimeFunction
label_desc: Use image node_id 7 for calling the Test obj's underlying member method code with example usage: obj.test_hawkes_em_kernel_shape() without return types