code: def test_fail_to_generate(self):
      report = pipeline_dp.ExplainComputationReport()
      report_generator = ReportGenerator(None, "test_method")
  
      # Simulate that one of the stages of report generation failed.
      def stage_fn():
          raise ValueError("Fail to generate")
  
      report_generator.add_stage(lambda: stage_fn)
  
      with self.assertRaisesRegex(
          ValueError, "report_generator is not set"
      ):
          report.text()
  
file_path: pipelinedp/tests/report_generator_test.py
imports: import unittest
  import pipeline_dp
  from pipeline_dp.aggregate_params import AggregateParams, Metrics
  from pipeline_dp.report_generator import ReportGenerator
label_desc: Use image node_id 2 for calling the ExplainComputationReportTest obj's underlying member method code with example usage: obj.test_fail_to_generate() without return types