[docs]@docstrings.dedent@time_performance(scope="add_start_end_events",event_name="helper",event_value="combine",)defadd_start_end_events(self:EventstreamType)->EventstreamType:""" A method of ``Eventstream`` class that creates two synthetic events in each user's path: ``path_start`` and ``path_end``. Returns ------- Eventstream Input ``eventstream`` with added synthetic events. See details :py:class:`.AddStartEndEvents`. """# avoid circular importfromretentioneering.data_processors_libimport(AddStartEndEvents,AddStartEndEventsParams,)fromretentioneering.preprocessing_graphimportPreprocessingGraphfromretentioneering.preprocessing_graph.nodesimportEventsNodep=PreprocessingGraph(source_stream=self)# type: ignorenode=EventsNode(processor=AddStartEndEvents(params=AddStartEndEventsParams(**{})))p.add_node(node=node,parents=[p.root])result=p.combine(node)delpcollect_data_performance(scope="add_start_end_events",event_name="metadata",called_params={},performance_data={},eventstream_index=self._eventstream_index,parent_eventstream_index=self._eventstream_index,child_eventstream_index=result._eventstream_index,)returnresult