code: def _convert_data_source(kwargs):
      is_user_source = kwargs.get("source", None) is not None
      if is_user_source:
          source = kwargs["source"]
          if not isinstance(source, ColumnarDataSource):
              try:
                  # try converting the source to ColumnDataSource
                  source = ColumnDataSource(source)
              except ValueError as err:
                  msg = f"Failed to auto-convert {type(source)} to ColumnDataSource.\n Original error: {err}"
                  raise ValueError(msg).with_traceback(
                      sys.exc_info()[2]
                  )
  
              # update kwargs so that others can use the new source
              kwargs["source"] = source
  
      return is_user_source
  
file_path: bokeh/src/bokeh/plotting/_renderer.py
imports: from __future__ import annotations
  import logging
  import sys
  from collections.abc import Iterable
  import numpy
  from ..core.properties import ColorSpec
  from ..models import ColumnarDataSource, ColumnDataSource, GlyphRenderer
  from ..util.strings import nice_join
  from ._legends import pop_legend_kwarg, update_legend
label_desc: Use image node_id 5 for calling a global function with example usage: _convert_data_source(kwargs) and returns: is_user_source