code: def test_wrap(
      fp_config, udf_output, udf_arg_provider, udf_output_receiver
  ):
      def test_udf(input, params, kwarg):
          # Verify wrapped function is called with auto-loaded arguments.
          assert (
              input
              is udf_arg_provider.provide_input_args.return_value[
                  "input"
              ]
          )
          assert (
              params
              is udf_arg_provider.provide_params_arg.return_value[
                  "params"
              ]
          )
          assert (
              kwarg
              is udf_arg_provider.provide_additional_kwargs.return_value[
                  "kwarg"
              ]
          )
          return udf_output
  
      udf_wrapper = UDFWrapper(udf_arg_provider, udf_output_receiver)
  
      # Execute decorator function and the decorated function.
      wrapped_udf = udf_wrapper.wrap(test_udf, fp_config)
      wrapped_udf()
  
      # Verify interactions with dependencies.
      udf_arg_provider.provide_input_args.assert_called_with(
          test_udf, fp_config
      )
      udf_arg_provider.provide_params_arg.assert_called_with(
          test_udf, fp_config
      )
      udf_arg_provider.provide_additional_kwargs.assert_called_with(
          test_udf
      )
      udf_output_receiver.ingest_udf_output.assert_called_with(
          udf_output, fp_config
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/feature_processor/test_udf_wrapper.py
imports: from __future__ import absolute_import
  from typing import Callable
  import pytest
  from mock import Mock
  from sagemaker.feature_store.feature_processor._feature_processor_config import FeatureProcessorConfig
  from sagemaker.feature_store.feature_processor._udf_arg_provider import UDFArgProvider
  from sagemaker.feature_store.feature_processor._udf_output_receiver import UDFOutputReceiver
  from sagemaker.feature_store.feature_processor._udf_wrapper import UDFWrapper
label_desc: Use image node_id 6 for calling a global function with example usage: test_wrap(fp_config, udf_output, udf_arg_provider, udf_output_receiver) and returns: udf_output