code: def test_ingest_udf_output_all_py4j_error_raised(
      df, feature_store_manager, spark_output_receiver
  ):
      fp_config = tdh.create_fp_config()
  
      # Simulate ingestion failure.
      mock_java_exception = Mock(_target_id="")
      mock_java_exception.getClass = Mock(
          return_value=Mock(
              getSimpleName=Mock(return_value="ValidationError")
          )
      )
      feature_store_manager.ingest_data.side_effect = Py4JJavaError(
          msg="", java_exception=mock_java_exception
      )
  
      with pytest.raises(Py4JJavaError):
          spark_output_receiver.ingest_udf_output(df, fp_config)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/feature_processor/test_udf_output_receiver.py
imports: from __future__ import absolute_import
  import pytest
  import test_data_helpers
  from feature_store_pyspark.FeatureStoreManager import FeatureStoreManager
  from mock import Mock
  from py4j.protocol import Py4JJavaError
  from pyspark.sql import DataFrame
  from sagemaker.feature_store.feature_processor import IngestionError
  from sagemaker.feature_store.feature_processor._spark_factory import FeatureStoreManagerFactory
  from sagemaker.feature_store.feature_processor._udf_output_receiver import SparkOutputReceiver
label_desc: Use image node_id 8 for calling a global function with example usage: test_ingest_udf_output_all_py4j_error_raised(df, feature_store_manager, spark_output_receiver) without return types