code: def test_create_captured_function():
      def foo():
          """my docstring"""
          return 42
  
      cf = create_captured_function(foo)
  
      assert cf.__name__ == "foo"
      assert cf.__doc__ == "my docstring"
      assert cf.prefix is None
      assert cf.config == {}
      assert not cf.uses_randomness
      assert callable(cf)
  
file_path: sacred/tests/test_config/test_captured_functions.py
imports: import datetime
  import mock
  import random
  import sacred.optional
  from sacred.config.captured_function import create_captured_function
  from sacred.settings import SETTINGS
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_captured_function() and returns: int