code: def get_scale(
      range_input: Range, axis_type: AxisType | None
  ) -> Scale:
      if isinstance(
          range_input, (DataRange1d, Range1d)
      ) and axis_type in [
          "linear",
          "datetime",
          "mercator",
          "auto",
          None,
      ]:
          return LinearScale()
      elif (
          isinstance(range_input, (DataRange1d, Range1d))
          and axis_type == "log"
      ):
          return LogScale()
      elif isinstance(range_input, FactorRange):
          return CategoricalScale()
      else:
          raise ValueError(
              f"Unable to determine proper scale for: '{range_input}'"
          )
  
file_path: bokeh/src/bokeh/plotting/_plot.py
imports: from __future__ import annotations
  import logging
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Any, Literal
  import numpy
  from ..core.properties import Datetime
  from ..core.property.singletons import Intrinsic
  from ..models import Axis, CategoricalAxis, CategoricalScale, ContinuousTicker, DataRange1d, DatetimeAxis, FactorRange, Grid, LinearAxis, LinearScale, LogAxis, LogScale, MercatorAxis, Range, Range1d, Scale
label_desc: Use image node_id 2 for calling a global function with example usage: get_scale(range_input, axis_type) and returns: LinearScale, LogScale, CategoricalScale