code: def sine(
      w: float, A: float = 1, phi: float = 0, offset: float = 0
  ) -> partial[Callable[[], None]]:
      """Return a driver function that can advance a sequence of sine values.
  
      .. code-block:: none
  
          value = A * sin(w*i + phi) + offset
  
      Args:
          w (float) : a frequency for the sine driver
          A (float) : an amplitude for the sine driver
          phi (float) : a phase offset to start the sine driver with
          offset (float) : a global offset to add to the driver values
  
      """
      from math import sin
  
      def f(i: float) -> float:
          return A * sin(w * i + phi) + offset
  
      return partial(force, sequence=_advance(f))
  
file_path: bokeh/src/bokeh/driving.py
imports: from __future__ import annotations
  import logging
  from functools import partial
  from typing import Any, Callable, Iterable, Iterator, Sequence, TypeVar
label_desc: Use image node_id 7 for calling a global function with example usage: sine(w, A, phi, offset) and returns: partial, unknown