code: def _test_relative_magnitudes(
      self,
      expected: np.ndarray,
      estimated: np.ndarray,
      significance_threshold: float,
      quantity_name: str,
      significance_band_width: float = 10,
  ):
      self.assertFalse(
          np.any(
              np.logical_and(
                  np.sort(np.abs(expected.flatten()))
                  < significance_threshold,
                  np.sort(np.abs(estimated.flatten()))
                  > significance_band_width * significance_threshold,
              )
          )
          or np.any(
              np.logical_and(
                  np.sort(np.abs(expected.flatten()))
                  > significance_band_width * significance_threshold,
                  np.sort(np.abs(estimated.flatten()))
                  < significance_threshold,
              )
          ),
          f"Sorted estimated {quantity_name} and sorted expected {quantity_name} "
          "have corresponding entries on the opposite side of the band "
          f"({significance_threshold}, {significance_band_width*significance_threshold}):\n"
          f"Sorted absolute estimated {quantity_name}:\n"
          f"{np.sort(np.abs(estimated.flatten()))}\n"
          f"Sorted absolute expected {quantity_name}:\n"
          f"{np.sort(np.abs(expected.flatten()))}\n",
      )
      significance_idx = np.logical_and(
          np.abs(expected) > significance_threshold,
          np.abs(estimated) > significance_threshold,
      )
      significant_estimated = estimated[significance_idx].flatten()
      significant_estimated_argsort = np.argsort(significant_estimated)
      sorted_significant_estimated = np.sort(significant_estimated)
      significant_expected = expected[significance_idx].flatten()
      significant_expected_argsort = np.argsort(significant_expected)
      sorted_significant_expected = np.sort(significant_expected)
      np.testing.assert_array_equal(
          significant_expected_argsort,
          significant_estimated_argsort,
          err_msg="Relative magnitudes of "
          f"estimated {quantity_name} differ from "
          f"relative magnitudes of expected {quantity_name}.\n"
          f"significant {quantity_name} expected :\n{significant_expected}\n"
          f"significant {quantity_name} estimated :\n{significant_estimated}\n"
          f"significant expected {quantity_name} argsort:\n{significant_expected_argsort}\n"
          f"significant estimated {quantity_name} argsort:\n{significant_estimated_argsort}\n",
      )
  
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 3 for calling the Test obj's underlying member method code with example usage: obj._test_relative_magnitudes(expected, estimated, significance_threshold, quantity_name, significance_band_width) without return types