code: def test_stream_callback_single_call(self):
      history = deque(maxlen=10)
  
      def history_callback(x):
          history.append(x)
          return Curve(list(history))
  
      stream = PointerX(x=0)
      dmap = DynamicMap(history_callback, kdims=[], streams=[stream])
      plot = mpl_renderer.get_plot(dmap)
      mpl_renderer(plot)
      for i in range(20):
          plot.state.set_dpi(72)
          stream.event(x=i)
      x, y = plot.handles["artist"].get_data()
      self.assertEqual(x, np.arange(10))
      self.assertEqual(y, np.arange(10, 20))
  
file_path: holoviews/holoviews/tests/plotting/matplotlib/test_callbacks.py
imports: from collections import deque
  import numpy
  from holoviews.core import DynamicMap
  from holoviews.element import Curve, Points
  from holoviews.streams import PointerX, PointerXY
  from .test_plot import TestMPLPlot, mpl_renderer
label_desc: Use image node_id 2 for calling the TestCallbackPlot obj's underlying member method code with example usage: obj.test_stream_callback_single_call() and returns: Curve