code: def test_stream_dict_to_ds_created_from_df(self) -> None:
      data = pd.DataFrame(dict(a=[10], b=[20], c=[30])).set_index("c")
      ds = bms.ColumnDataSource(data)
      ds._document = "doc"
  
      notify_owners_stuff = {}
  
      def notify_owners_mock(*args, **kw):
          notify_owners_stuff["args"] = args
          notify_owners_stuff["kw"] = kw
  
      ds.data._notify_owners = notify_owners_mock
  
      stream_stuff = {}
      data_stream = ds.data._stream
  
      def stream_wrapper(*args, **kwargs):
          stream_stuff["args"] = args
          stream_stuff["kwargs"] = kwargs
          data_stream(*args, **kwargs)
  
      ds.data._stream = stream_wrapper
  
      ds._stream(
          dict(a=[11, 12], b=np.array([21, 22]), c=pd.Series([31, 32])),
          7,
      )
  
      assert len(stream_stuff["args"]) == 5
      expected_stream_args = (
          "doc",
          ds,
          dict(a=[11, 12], b=np.array([21, 22]), c=pd.Series([31, 32])),
          7,
          None,
      )
      for i, (arg, ex_arg) in enumerate(
          zip(stream_stuff["args"], expected_stream_args)
      ):
          if i == 2:
              assert arg["a"] == ex_arg["a"]
              del arg["a"], ex_arg["a"]
              self._assert_equal_dicts_of_arrays(arg, ex_arg)
          else:
              assert arg == ex_arg
  
      assert stream_stuff["kwargs"] == {}
  
      assert len(notify_owners_stuff["args"]) == 1
      self._assert_equal_dicts_of_arrays(
          notify_owners_stuff["args"][0],
          dict(a=np.array([10]), b=np.array([20]), c=np.array([30])),
      )
  
      self._assert_equal_dicts_of_arrays(
          dict(ds.data),
          dict(
              a=np.array([10, 11, 12]),
              b=np.array([20, 21, 22]),
              c=np.array([30, 31, 32]),
          ),
      )
  
imports: from __future__ import annotations
  import pytest
  import datetime
  import io
  import numpy
  import pandas
  from bokeh.models import Selection
  from bokeh.util.serialization import convert_datetime_array
  from bokeh.util.warnings import BokehDeprecationWarning
  import bokeh.models.sources
label_desc: Use image node_id 39 for calling the TestColumnDataSource obj's underlying member method code with example usage: obj.test_stream_dict_to_ds_created_from_df() without return types