code: def test_data_column_lengths(self) -> None:
      # TODO: use this when soft=False
      #
      # with pytest.raises(ValueError):
      #    bms.ColumnDataSource(data=dict(a=[10, 11], b=[20, 21, 22]))
      #
      # ds = bms.ColumnDataSource()
      # with pytest.raises(ValueError):
      #    ds.data = dict(a=[10, 11], b=[20, 21, 22])
      #
      # ds = bms.ColumnDataSource(data=dict(a=[10, 11]))
      # with pytest.raises(ValueError):
      #    ds.data["b"] = [20, 21, 22]
      #
      # ds = bms.ColumnDataSource(data=dict(a=[10, 11], b=[20, 21]))
      # with pytest.raises(ValueError):
      #    ds.data.update(dict(a=[10, 11, 12]))
  
      with pytest.warns(UserWarning) as warns:
          bms.ColumnDataSource(data=dict(a=[10, 11], b=[20, 21, 22]))
      assert len(warns) == 1
      assert (
          str(warns[0].message)
          == "ColumnDataSource's columns must be of the same length. Current lengths: ('a', 2), ('b', 3)"
      )
  
      ds = bms.ColumnDataSource()
      with pytest.warns(UserWarning) as warns:
          ds.data = dict(a=[10, 11], b=[20, 21, 22])
      assert len(warns) == 1
      assert (
          str(warns[0].message)
          == "ColumnDataSource's columns must be of the same length. Current lengths: ('a', 2), ('b', 3)"
      )
  
      ds = bms.ColumnDataSource(data=dict(a=[10, 11]))
      with pytest.warns(UserWarning) as warns:
          ds.data["b"] = [20, 21, 22]
      assert len(warns) == 1
      assert (
          str(warns[0].message)
          == "ColumnDataSource's columns must be of the same length. Current lengths: ('a', 2), ('b', 3)"
      )
  
      ds = bms.ColumnDataSource(data=dict(a=[10, 11], b=[20, 21]))
      with pytest.warns(UserWarning) as warns:
          ds.data.update(dict(a=[10, 11, 12]))
      assert len(warns) == 1
      assert (
          str(warns[0].message)
          == "ColumnDataSource's columns must be of the same length. Current lengths: ('a', 3), ('b', 2)"
      )
  
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 48 for calling the TestColumnDataSource obj's underlying member method code with example usage: obj.test_data_column_lengths() without return types