code: def clear_plot(self, stream_vis, clear_history):
      traces = (
          range(len(stream_vis.trace_history))
          if clear_history
          else (stream_vis.trace_index,)
      )
      for i in traces:
          stream_vis.trace_index = i
  
          self.widget.data[stream_vis.trace_index].x = []
          self.widget.data[stream_vis.trace_index].y = []
          if self.is_3d:
              self.widget.data[stream_vis.trace_index].z = []
          self.widget.data[stream_vis.trace_index].text = ""
          # TODO: avoid removing annotations for other streams
          self.widget.layout.annotations = []
  
file_path: tensorwatch/tensorwatch/plotly/line_plot.py
imports: from .base_plotly_plot import BasePlotlyPlot
  from ..lv_types import EventData
  from ..None import utils
label_desc: Use image node_id 6 for calling the LinePlot obj's underlying member method code with example usage: obj.clear_plot(stream_vis, clear_history) without return types