docstr: Returns coefficients corresponding to a constant relative incidence
  of value equal to `amplitude`. If `cut` is greater than 0, the relative
  incidence will be null on [`cut`, `n_intervals`]
docstr_tok: ["Returns","coefficients","corresponding","to","a","constant","relative","incidence","of","value","equal","to","`","amplitude","`",".","If","`","cut","`","is","greater","than","0",",","the","relative","incidence","will","be","null","on","[","`","cut","`",",","`","n_intervals","`","]"]
code: def constant_effect(self, amplitude, cut=0):
      """Returns coefficients corresponding to a constant relative incidence
      of value equal to `amplitude`. If `cut` is greater than 0, the relative
      incidence will be null on [`cut`, `n_intervals`]
      """
      risk_curve = np.ones(self.n_intervals) * amplitude
      if cut > 0:
          risk_curve[cut:] = 1
      return risk_curve
  
imports: from operator import itemgetter
  import numpy
  import scipy.sparse
  from scipy.sparse import csr_matrix
  from tick.base.simulation import Simu
  from tick.hawkes import SimuHawkesExpKernels, SimuHawkesMulti
  from tick.preprocessing import LongitudinalFeaturesLagger
  from itertools import permutations
  from copy import deepcopy
  from scipy.stats import beta, norm
label_desc: Use image node_id 2 for calling the CustomEffects obj's underlying member method code with example usage: obj.constant_effect(amplitude, cut) and returns: risk_curve