code: def make_table(editor, values):
      source = ColumnDataSource({"values": values})
      column = TableColumn(
          field="values", title="values", editor=editor()
      )
      table = DataTable(
          source=source, columns=[column], editable=True, width=600
      )
      # this is triggered on selection changes
      source.selected.js_on_change(
          "indices",
          CustomJS(
              args=dict(s=source),
              code=RECORD("values", "s.data.values"),
          ),
      )
      return table
  
file_path: bokeh/tests/integration/widgets/tables/test_cell_editors.py
imports: from __future__ import annotations
  import pytest
  from time import sleep
  from bokeh.models import ColumnDataSource, CustomJS, DataTable, IntEditor, NumberEditor, StringEditor, TableColumn
  from tests.support.plugins.project import BokehModelPage
  from tests.support.util.selenium import RECORD, enter_text_in_cell, enter_text_in_cell_with_click_enter, escape_cell, get_table_cell
label_desc: Use image node_id 1 for calling a global function with example usage: make_table(editor, values) and returns: table