docstr: ...Test that hawkes cumulant reached expected value
          
docstr_tok: ["...","Test","that","hawkes","cumulant","reached","expected","value"]
code: def _test_hawkes_cumulants_solve(
      self,
      Learner=HawkesCumulantMatchingTf,
      max_iter=4000,
      print_every=30,
      step=1e-4,
      solver="adam",
      penalty=None,
      C=1e-3,
      tol=1e-16,
      verbose=False,
      R_significance_threshold=1e-4,
      adjacency_significance_threshold=1e-4,
      baseline_significance_threshold=1e-4,
      significance_band_width=10.0,
  ):
      """...Test that hawkes cumulant reached expected value"""
      multi = Test.get_simulated_model()
      n_nodes = multi.hawkes_simu.n_nodes
      timestamps = multi.timestamps
      baseline = multi.hawkes_simu.baseline
      decays = multi.hawkes_simu.decays
      integration_support = 0.3
  
      learner = Learner(
          integration_support=integration_support,
          max_iter=max_iter,
          print_every=print_every,
          step=step,
          solver=solver,
          penalty=penalty,
          C=C,
          tol=tol,
      )
      learner.fit(timestamps)
      if verbose:
          learner.print_history()
  
      expected_R_pred = np.linalg.inv(
          np.eye(n_nodes) - multi.hawkes_simu.adjacency
      )
  
      if verbose:
          print("\n_test_hawkes_cumulants_solve")
          print(f"Learner: {Learner}")
          print(f"penalty: {penalty}")
          print(f"expected_R_pred:\n{expected_R_pred}")
          print(f"solution:\n{learner.solution}")
  
      self._test_relative_magnitudes(
          quantity_name="R",
          expected=expected_R_pred,
          estimated=learner.solution,
          significance_threshold=R_significance_threshold,
          significance_band_width=significance_band_width,
      )
  
      self.assertTrue(
          np.allclose(
              learner.solution,
              expected_R_pred,
              atol=0.1,  # TODO: explain why estimation is not so accurate
              rtol=0.25,
          )
      )
  
      expected_baseline = baseline
  
      if verbose:
          print("\n")
          print(f"expected_baseline:\n{expected_baseline}")
          print(f"estimated_baseline:\n{learner.baseline}")
  
      self._test_relative_magnitudes(
          quantity_name="baseline",
          expected=expected_baseline,
          estimated=learner.baseline,
          significance_threshold=baseline_significance_threshold,
          significance_band_width=significance_band_width,
      )
  
      self.assertTrue(
          np.allclose(
              learner.baseline,
              expected_baseline,
              atol=0.01,
              rtol=0.1,
          )
      )
  
      expected_adjacency = multi.hawkes_simu.adjacency
      if verbose:
          print("\n")
          print(f"expected_adjacency:\n{expected_adjacency}")
          print(f"estimated_adjacency:\n{learner.adjacency}")
  
      self._test_relative_magnitudes(
          quantity_name="adjacency",
          expected=expected_adjacency,
          estimated=learner.adjacency,
          significance_threshold=adjacency_significance_threshold,
          significance_band_width=significance_band_width,
      )
  
      if penalty in ("l1", "l2"):
          atol = 0.2
      else:
          atol = 0.1
      self.assertTrue(
          np.allclose(
              learner.adjacency,
              expected_adjacency,
              atol=atol,  # TODO: explain why estimation is not so accurate
              rtol=0.25,
          )
      )
  
imports: import os
  import pickle
  import unittest
  import numpy
  from tick.base.inference import InferenceTest
  from tick.hawkes import HawkesCumulantMatching, HawkesCumulantMatchingTf, HawkesCumulantMatchingPyT
  from tick.hawkes.inference.hawkes_cumulant_matching import HawkesTheoreticalCumulant
label_desc: Use image node_id 12 for calling the Test obj's underlying member method code with example usage: obj._test_hawkes_cumulants_solve(Learner, max_iter, print_every, step, solver, penalty, C, tol, verbose, R_significance_threshold, adjacency_significance_threshold, baseline_significance_threshold, significance_band_width) without return types