docstr: ...Test that the number of used threads is as expected
          
docstr_tok: ["...","Test","that","the","number","of","used","threads","is","as","expected"]
code: def test_hawkes_list_n_threads(self):
      """...Test that the number of used threads is as expected"""
      model_list = ModelHawkesExpKernLogLik(
          decay=self.decay, n_threads=1
      )
  
      # 0 threads yet as no data has been given
      self.assertEqual(model_list._model.get_n_threads(), 0)
  
      # Now that it has been fitted it equals
      # min(n_threads, n_nodes * n_realizations)
      model_list.fit(self.timestamps_list)
      self.assertEqual(model_list._model.get_n_threads(), 1)
  
      model_list.n_threads = 8
      self.assertEqual(model_list._model.get_n_threads(), 6)
  
      realization_2_nodes = [np.array([3.0, 4.0]), np.array([3.5, 6.0])]
  
      model_list.fit(realization_2_nodes)
      self.assertEqual(model_list._model.get_n_threads(), 2)
  
      model_list.n_threads = 1
      self.assertEqual(model_list._model.get_n_threads(), 1)
  
file_path: tick/tick/hawkes/model/tests/model_hawkes_expkern_loglik_test.py
imports: import unittest
  import numpy
  from scipy.optimize import check_grad
  from tick.hawkes.model import ModelHawkesExpKernLogLik
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_log_likelihood, hawkes_exp_kernel_intensities
label_desc: Use image node_id 9 for calling the Test obj's underlying member method code with example usage: obj.test_hawkes_list_n_threads() without return types