code: def simulate_hawkes_nonparam_kern(end_time=30000, seed=None):
      t_values1 = np.array([0, 1, 1.5, 2.0, 3.5], dtype=float)
      y_values1 = np.array([0, 0.2, 0, 0.1, 0.0], dtype=float)
      tf1 = TimeFunction(
          [t_values1, y_values1],
          inter_mode=TimeFunction.InterConstRight,
          dt=0.1,
      )
      kernel1 = HawkesKernelTimeFunc(tf1)
  
      t_values2 = np.linspace(0, 4, 20)
      y_values2 = np.maximum(0.0, np.sin(t_values2) / 4)
      tf2 = TimeFunction([t_values2, y_values2])
      kernel2 = HawkesKernelTimeFunc(tf2)
  
      baseline = np.array([0.1, 0.3])
  
      hawkes = SimuHawkes(
          baseline=baseline,
          end_time=end_time,
          verbose=False,
          seed=seed,
      )
  
      hawkes.set_kernel(0, 0, kernel1)
      hawkes.set_kernel(0, 1, HawkesKernelExp(0.5, 0.7))
      hawkes.set_kernel(1, 1, kernel2)
  
      hawkes.simulate()
      return hawkes
  
imports: import unittest
  import numpy
  from tick.hawkes.inference import HawkesEM
  from tick.hawkes.model.tests.model_hawkes_test_utils import hawkes_intensities, hawkes_log_likelihood
  from tick.hawkes import SimuHawkes, HawkesKernelTimeFunc, HawkesKernelExp, SimuHawkesExpKernels
  from tick.base import TimeFunction
label_desc: Use image node_id 3 for calling a global function with example usage: simulate_hawkes_nonparam_kern(end_time, seed) and returns: hawkes