code: def hawkes_intensities(timestamps, baseline, kernels):
      dim = len(baseline)
      intensities = {}
      for i in range(dim):
          intensities[i] = lambda x, i=i: baseline[i] + sum(
              [
                  sum(
                      kernels[i][j](
                          x - timestamps[j][timestamps[j] < x]
                      )
                  )
                  for j in range(dim)
              ]
          )
      return intensities
  
file_path: tick/tick/hawkes/model/tests/model_hawkes_test_utils.py
imports: import numpy
  from scipy.integrate import quad
label_desc: Use image node_id 3 for calling a global function with example usage: hawkes_intensities(timestamps, baseline, kernels) and returns: intensities