code: def _compare_profile_report_preprocess(
      reports: List[ProfileReport],
      config: Optional[Settings] = None,
  ) -> Tuple[List[str], List[BaseDescription]]:
      # Use titles as labels
      labels = [report.config.title for report in reports]
  
      # Use color per report if not custom set
      if config is None:
          if len(reports[0].config.html.style.primary_colors) > 1:
              for idx, report in enumerate(reports):
                  report.config.html.style.primary_colors = [
                      report.config.html.style.primary_colors[idx]
                  ]
      else:
          if len(config.html.style.primary_colors) > 1:
              for idx, report in enumerate(reports):
                  report.config.html.style.primary_colors = (
                      config.html.style.primary_colors
                  )
  
      # enforce same types
      for report in reports[1:]:
          report._typeset = reports[0].typeset
  
      # Obtain description sets
      descriptions = [report.get_description() for report in reports]
      for label, description in zip(labels, descriptions):
          description.analysis.title = label
  
      return labels, descriptions
  
imports: import json
  import warnings
  from dataclasses import asdict
  from typing import Any, List, Optional, Tuple, Union
  import pandas
  from dacite import from_dict
  from ydata_profiling.config import Correlation, Settings
  from ydata_profiling.model import BaseDescription
  from ydata_profiling.model.alerts import Alert
  from ydata_profiling.profile_report import ProfileReport
label_desc: Use image node_id 9 for calling a global function with example usage: _compare_profile_report_preprocess(reports, config) and returns: labels,  descriptions