code: def speed_to_angle(speed: float, units: str) -> float:
      max_speed = max_kmh if units == "kmh" else max_mph
      speed = min(max(speed, 0), max_speed)
      total_angle = start_angle - end_angle
      angle = total_angle * float(speed) / max_speed
      return start_angle - angle
  
file_path: bokeh/examples/models/gauges.py
imports: from math import pi
  from typing import Any, Literal
  from bokeh.core.properties import expr, value
  from bokeh.document import Document
  from bokeh.embed import file_html
  from bokeh.models import Arc, Circle, ColumnDataSource, Plot, PolarTransform, Range1d, Ray, Text
  from bokeh.util.browser import view
label_desc: Use image node_id 2 for calling a global function with example usage: speed_to_angle(speed, units) and returns: unknown