docstr: Reimplement assertWarnsRegex method because Python 3.5 ones is buggy
          
docstr_tok: ["Reimplement","assertWarnsRegex","method","because","Python","3.5","ones","is","buggy"]
code: def assertWarnsRegex(self, expected_warning, expected_regex):
      """Reimplement assertWarnsRegex method because Python 3.5 ones is buggy"""
      with warnings.catch_warnings(record=True) as w:
          yield
          self.assertGreater(len(w), 0, "No warning have been raised")
          self.assertLess(
              len(w),
              2,
              "Several warnings have been raised. " "Expected 1",
          )
          self.assertTrue(
              issubclass(w[0].category, expected_warning),
              "Expected %s got %s" % (expected_warning, w[0].category),
          )
          self.assertRegex(
              str(w[0].message),
              expected_regex,
              "Warnings regex do not match",
          )
  
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 1 for calling the Test obj's underlying member method code with example usage: obj.assertWarnsRegex(expected_warning, expected_regex) without return types