docstr: ...Test PoissonRegression setting of random_state parameter of solver
          
docstr_tok: ["...","Test","PoissonRegression","setting","of","random_state","parameter","of","solver"]
code: def test_PoissonRegression_solver_random_state(self):
      """...Test PoissonRegression setting of random_state parameter of solver"""
      for solver in PoissonRegression._solvers.keys():
          if solver in ["agd", "gd", "bfgs"]:
              msg = (
                  '^Solver "%s" has no settable random_state$' % solver
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner = PoissonRegression(
                      solver=solver, random_state=1
                  )
  
                  self.assertIsNone(learner.random_state)
          else:
              learner = PoissonRegression(
                  solver=solver, random_state=self.int_1
              )
              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):
                  PoissonRegression(solver=solver, random_state=-1)
  
          msg = "^random_state is readonly in PoissonRegression$"
          with self.assertRaisesRegex(AttributeError, msg):
              learner = PoissonRegression(solver=solver)
              learner.random_state = self.int_2
  
imports: import unittest
  from itertools import product
  import numpy
  from tick.base.inference import InferenceTest
  from tick.linear_model import SimuPoisReg, PoissonRegression
  from tick.simulation import weights_sparse_gauss
label_desc: Use image node_id 11 for calling the Test obj's underlying member method code with example usage: obj.test_PoissonRegression_solver_random_state() without return types