class_docstr: Base class of Hawkes learners
  
  Parameters
  ----------
  tol : `float`, default=1e-5
      The tolerance of the solver (iterations stop when the stopping
      criterion is below it). If not reached the solver does ``max_iter``
      iterations
  
  max_iter : `int`, default=100
      Maximum number of iterations of the solver
  
  verbose : `bool`, default=False
      If `True`, we verbose things, otherwise the solver does not
      print anything (but records information in history anyway)
  
  print_every : `int`, default=10
      Print history information when ``n_iter`` (iteration number) is
      a multiple of ``print_every``
  
  record_every : `int`, default=10
      Record history information when ``n_iter`` (iteration number) is
      a multiple of ``record_every``
  
  Notes
  -----
  This class should be not used by end-users, it is intended for
  development only.
code: def _clean_events_and_endtimes(self, events):
      if len(events[0]) == 0 or not isinstance(
          events[0][0], np.ndarray
      ):
          events = [events]
  
      end_times = self._end_times
      if end_times is None:
          non_empty_events = [
              [r for r in e if len(r) > 0] for e in events
          ]
          end_times = np.array(
              [max(map(max, e)) for e in non_empty_events]
          )
  
      if isinstance(end_times, (int, float)):
          end_times = np.array([end_times], dtype=float)
  
      return events, end_times
  
file_path: tick/tick/hawkes/inference/base/learner_hawkes_noparam.py
imports: import numpy
  from tick.solver.base import Solver
label_desc: Use image node_id 5 for calling the LearnerHawkesNoParam obj's underlying member method code with example usage: obj._clean_events_and_endtimes(events) and returns: events,  end_times