docstr: ...Test error messages raised by SimuHawkes constructor
          
docstr_tok: ["...","Test","error","messages","raised","by","SimuHawkes","constructor"]
code: def test_simu_hawkes_constructor_errors(self):
      """...Test error messages raised by SimuHawkes constructor"""
      bad_baseline = np.random.rand(4)
      bad_kernels = self.kernels[:, 0:1]
  
      msg = (
          "^kernels and baseline have different length. kernels has "
          "length 2, whereas baseline has length 4\.$"
      )
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes(kernels=self.kernels, baseline=bad_baseline)
  
      msg = (
          "^n_nodes will be automatically calculated if baseline or "
          "kernels is set$"
      )
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes(kernels=self.kernels, n_nodes=2)
  
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes(baseline=self.baseline, n_nodes=2)
  
      msg = (
          "^n_nodes must be given if neither kernels, nor baseline are "
          "given$"
      )
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes()
  
      msg = "^kernels shape should be \(2, 2\) instead of \(2, 1\)$"
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes(kernels=bad_kernels)
  
      msg = "^n_nodes must be positive but equals -1$"
      with self.assertRaisesRegex(ValueError, msg):
          SimuHawkes(n_nodes=-1)
  
imports: import unittest
  import warnings
  from contextlib import contextmanager
  from itertools import product
  import numpy
  from tick.base import TimeFunction
  from tick.hawkes import SimuHawkes, HawkesKernelExp, HawkesKernelSumExp, HawkesKernel0, HawkesKernelPowerLaw, HawkesKernelTimeFunc, SimuHawkesExpKernels
label_desc: Use image node_id 8 for calling the Test obj's underlying member method code with example usage: obj.test_simu_hawkes_constructor_errors() without return types