code: def test_validator_chain_validation_fails():
      fp_config = tdh.create_fp_config()
      udf = Mock(Callable)
  
      first_validator = Mock(validate=Mock(side_effect=ValueError()))
      second_validator = Mock(validate=Mock())
      validator_chain = ValidatorChain(
          [first_validator, second_validator]
      )
  
      with pytest.raises(ValueError):
          validator_chain.validate(udf, 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 2 for calling a global function with example usage: test_validator_chain_validation_fails() without return types