class_docstr: Test case: Create Report using various dataset on pillar 2
  - refer to README in sample_input for more info on dataset
  - please update the config to include other feature in p2
class_docstr_tok: ["Test","case",":","Create","Report","using","various","dataset","on","pillar","2","-","refer","to","README","in","sample_input","for","more","info","on","dataset","-","please","update","the","config","to","include","other","feature","in","p2"]
docstr: Test report rendering with json config file 
docstr_tok: ["Test","report","rendering","with","json","config","file"]
code: def test_json_generate_report(self):
      """Test report rendering with json config file"""
      start_time = datetime.now().replace(microsecond=0)
      controller = Controller(config=Configuration(self.json))
      controller.render()
      end_time = datetime.now().replace(microsecond=0)
  
      # -- PDF Report --
      output = "%s/%s.pdf" % (self.out_path, self.json_writer_pdf_name)
      print("JSON-PDF report generated %s:" % output)
  
      with open(output, "rb") as f:
          pdf = PdfFileReader(f)
          info = pdf.getDocumentInfo()
          number_of_pages = pdf.getNumPages()
  
      print(info)
      self.assertEqual(info["/Title"], self.json_report_name)
  
      # print(info['/CreationDate'])
      report_time = datetime.strptime(
          info["/CreationDate"], "D:%Y%m%d%H%M%S"
      )
      print("{} {} {}".format(start_time, report_time, end_time))
      self.assertTrue(time_in_range(start_time, end_time, report_time))
  
      print(number_of_pages)
      self.assertEqual(
          number_of_pages, self.json_writer_pdf_page_number
      )
  
      # -- HTML Report --
      output = "%s/%s.html" % (
          self.out_path,
          self.json_writer_html_name,
      )
      print("JSON-HTML report generated %s:" % output)
  
      with open(output) as f:
          read_data = f.read()
  
      index = read_data.find(self.json_report_name)
      # -- the header start at index 1279 --
      self.assertEqual(index, 1279)
  
      index = read_data.find("created on")
      create_date = read_data[index + 11 : index + 30]
      print(create_date)
      report_time = datetime.strptime(create_date, "%Y-%m-%d %H:%M:%S")
      print("{} {} {}".format(start_time, report_time, end_time))
      self.assertTrue(time_in_range(start_time, end_time, report_time))
  
      number_of_tags = read_data.count('class="tab_contents"')
      # print(number_of_tags)
      self.assertEqual(number_of_tags, self.json_writer_html_tag_number)
  
file_path: contextual-ai/tests/compiler/test_feature_importance_ranking_with_tabular_lime_shap_classification.py
imports: import sys
  import warnings
  from PyPDF2 import PdfFileReader
  from datetime import datetime
  import unittest
  from xai.compiler import Configuration, Controller
  from tests.compiler.util import prepare_template, read_json_source, read_yaml_source, prepare_output_path, time_in_range, remove_temp
label_desc: Use image node_id 3 for calling the TestFeatureImportanceRanking obj's underlying member method code with example usage: obj.test_json_generate_report() without return types