code: def test_data_accepts_dataframe_index_named_column(self) -> None:
      data = dict(a=[1, 2], b=[2, 3], index=[4, 5])
      df = pd.DataFrame(data)
      ds = bms.ColumnDataSource()
      assert ds.data == {}
      ds.data = df
      assert set(df.columns).issubset(set(ds.column_names))
      for key in data.keys():
          assert isinstance(ds.data[key], np.ndarray)
          assert list(df[key]) == list(ds.data[key])
      assert isinstance(ds.data["level_0"], np.ndarray)
      assert [0, 1] == list(ds.data["level_0"])
      assert set(ds.column_names) - set(df.columns) == {"level_0"}
  
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 10 for calling the TestColumnDataSource obj's underlying member method code with example usage: obj.test_data_accepts_dataframe_index_named_column() without return types