code: def register_templates():
      
      event_templates = [current_stats._events_config[e]
                         ['templates']
                         for e in
                         current_stats._events_config]
      aggregation_templates = [current_stats._aggregations_config[a]
                               ['templates']
                               for a in
                               current_stats._aggregations_config]
      return event_templates + aggregation_templates
docs: Register elasticsearch templates for events.