docstr: ...Test HawkesSumExpKern setting of parameter of C
          
docstr_tok: ["...","Test","HawkesSumExpKern","setting","of","parameter","of","C"]
code: def test_HawkesSumExpKern_penalty_C(self):
      """...Test HawkesSumExpKern setting of parameter of C"""
      for penalty in penalties:
          if penalty != "none":
              learner = HawkesSumExpKern(
                  self.decays, penalty=penalty, C=self.float_1
              )
              self.assertEqual(learner.C, self.float_1)
              self.assertEqual(
                  learner._prox_obj.strength, 1.0 / self.float_1
              )
              learner.C = self.float_2
              self.assertEqual(learner.C, self.float_2)
              self.assertEqual(
                  learner._prox_obj.strength, 1.0 / self.float_2
              )
  
              msg = "^``C`` must be positive, got -1$"
              with self.assertRaisesRegex(ValueError, msg):
                  HawkesSumExpKern(self.decays, penalty=penalty, C=-1)
  
          else:
              learner = HawkesSumExpKern(self.decays, penalty=penalty)
              msg = '^You cannot set C for penalty "%s"$' % penalty
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner.C = self.float_1
  
          msg = "^``C`` must be positive, got -2$"
          with self.assertRaisesRegex(ValueError, msg):
              learner.C = -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 12 for calling the Test obj's underlying member method code with example usage: obj.test_HawkesSumExpKern_penalty_C() without return types