code: def _collector(results):
      def foo(val):
          results.append(val)
  
      return foo
  
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 1 for calling a global function with example usage: _collector(results) and returns: foo