code: def test_spark_udf_signature_validator_valid():
      # One Input
      fp_config = tdh.create_fp_config(
          inputs=[tdh.FEATURE_GROUP_DATA_SOURCE]
      )
  
      def one_data_source(fg_data_source, params, spark):
          return None
  
      SparkUDFSignatureValidator().validate(one_data_source, fp_config)
  
      # Two Inputs
      fp_config = tdh.create_fp_config(
          inputs=[tdh.FEATURE_GROUP_DATA_SOURCE, tdh.S3_DATA_SOURCE]
      )
  
      def two_data_sources(
          fg_data_source, s3_data_source, params, spark
      ):
          return None
  
      SparkUDFSignatureValidator().validate(two_data_sources, fp_config)
  
      # No Optional Args (params and spark)
      fp_config = tdh.create_fp_config(
          inputs=[tdh.FEATURE_GROUP_DATA_SOURCE, tdh.S3_DATA_SOURCE]
      )
  
      def no_optional_args(fg_data_source, s3_data_source):
          return None
  
      SparkUDFSignatureValidator().validate(no_optional_args, fp_config)
  
      # Optional Args (no params)
      fp_config = tdh.create_fp_config(
          inputs=[tdh.FEATURE_GROUP_DATA_SOURCE, tdh.S3_DATA_SOURCE]
      )
  
      def no_optional_params_arg(fg_data_source, s3_data_source, spark):
          return None
  
      SparkUDFSignatureValidator().validate(
          no_optional_params_arg, fp_config
      )
  
      # No Optional Args (no spark)
      fp_config = tdh.create_fp_config(
          inputs=[tdh.FEATURE_GROUP_DATA_SOURCE, tdh.S3_DATA_SOURCE]
      )
  
      def no_optional_spark_arg(fg_data_source, s3_data_source, params):
          return None
  
      SparkUDFSignatureValidator().validate(
          no_optional_spark_arg, fp_config
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/feature_processor/test_validation.py
imports: from __future__ import absolute_import
  from typing import Callable
  from pyspark.sql import DataFrame
  import pytest
  import test_data_helpers
  import string
  import random
  from mock import Mock
  from sagemaker.feature_store.feature_processor._validation import SparkUDFSignatureValidator, Validator, ValidatorChain, BaseDataSourceValidator
  from sagemaker.feature_store.feature_processor._data_source import BaseDataSource
label_desc: Use image node_id 3 for calling a global function with example usage: test_spark_udf_signature_validator_valid() and returns: None, None, None, None, None