code: def test_callbacks():
      from functools import partial
      from pybind11_tests import (
          test_callback1,
          test_callback2,
          test_callback3,
          test_callback4,
          test_callback5,
      )
  
      def func1():
          return "func1"
  
      def func2(a, b, c, d):
          return "func2", a, b, c, d
  
      def func3(a):
          return "func3({})".format(a)
  
      assert test_callback1(func1) == "func1"
      assert test_callback2(func2) == ("func2", "Hello", "x", True, 5)
      assert test_callback1(partial(func2, 1, 2, 3, 4)) == (
          "func2",
          1,
          2,
          3,
          4,
      )
      assert (
          test_callback1(partial(func3, "partial")) == "func3(partial)"
      )
      assert test_callback3(lambda i: i + 1) == "func(43) = 44"
  
      f = test_callback4()
      assert f(43) == 44
      f = test_callback5()
      assert f(number=43) == 44
  
imports: import pytest
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