code: def test_callbacks():
      from functools import partial
  
      def func1():
          return "func1"
  
      def func2(a, b, c, d):
          return "func2", a, b, c, d
  
      def func3(a):
          return f"func3({a})"
  
      assert m.test_callback1(func1) == "func1"
      assert m.test_callback2(func2) == ("func2", "Hello", "x", True, 5)
      assert m.test_callback1(partial(func2, 1, 2, 3, 4)) == (
          "func2",
          1,
          2,
          3,
          4,
      )
      assert (
          m.test_callback1(partial(func3, "partial"))
          == "func3(partial)"
      )
      assert m.test_callback3(lambda i: i + 1) == "func(43) = 44"
  
      f = m.test_callback4()
      assert f(43) == 44
      f = m.test_callback5()
      assert f(number=43) == 44
  
file_path: coremltools/deps/pybind11/tests/test_callbacks.py
imports: import time
  from threading import Thread
  import pytest
  import env
  from pybind11_tests import callbacks
label_desc: Use image node_id 1 for calling a global function with example usage: test_callbacks() and returns: str, str,  a,  b,  c,  d, str, a, str