docstr: ...Test HawkesSumExpKern setting of random_state
  parameter of solver
docstr_tok: ["...","Test","HawkesSumExpKern","setting","of","random_state","parameter","of","solver"]
code: def test_HawkesSumExpKern_solver_random_state(self):
      """...Test HawkesSumExpKern setting of random_state
      parameter of solver
      """
      for solver in solvers:
          if solver in ["bfgs", "gd", "agd"]:
              msg = (
                  '^Solver "%s" has no settable random_state$' % solver
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner = HawkesSumExpKern(
                      self.decays,
                      solver=solver,
                      random_state=1,
                      **Test.specific_solver_kwargs(solver),
                  )
                  self.assertIsNone(learner.random_state)
          else:
              learner = HawkesSumExpKern(
                  self.decays,
                  solver=solver,
                  random_state=self.int_1,
                  **Test.specific_solver_kwargs(solver),
              )
              self.assertEqual(learner.random_state, self.int_1)
              self.assertEqual(learner._solver_obj.seed, self.int_1)
  
              msg = "^random_state must be positive, got -1$"
              with self.assertRaisesRegex(ValueError, msg):
                  HawkesSumExpKern(
                      self.decays, solver=solver, random_state=-1
                  )
  
          msg = "^random_state is readonly in " "HawkesSumExpKern"
          with self.assertRaisesRegex(AttributeError, msg):
              learner = HawkesSumExpKern(
                  self.decays,
                  solver=solver,
                  **Test.specific_solver_kwargs(solver),
              )
              learner.random_state = self.int_2
  
imports: import unittest
  import numpy
  from tick.base.inference import InferenceTest
  from tick.hawkes import SimuHawkesSumExpKernels, SimuHawkesMulti
  from tick.hawkes.inference import HawkesSumExpKern
  from tick.prox import ProxNuclear
  from tick.prox import ProxPositive, ProxL1, ProxL2Sq, ProxElasticNet
  from tick.solver import AGD, GD, BFGS, SGD, SVRG
label_desc: Use image node_id 16 for calling the Test obj's underlying member method code with example usage: obj.test_HawkesSumExpKern_solver_random_state() without return types