code: def test_cosine() -> None:
      results = []
      func = bd.cosine(w, A, phi, offset)(_collector(results))
      for i in range(4):
          func()
      assert_allclose(
          results,
          [
              4.985012495834077,
              4.763182982008655,
              4.294526561853465,
              3.6209069176044197,
          ],
      )
  
file_path: bokeh/tests/unit/bokeh/test_driving.py
imports: from __future__ import annotations
  import pytest
  from numpy.testing import assert_allclose
  from tests.support.util.api import verify_all
  import bokeh.driving
label_desc: Use image node_id 3 for calling a global function with example usage: test_cosine() without return types