code: def make_classification_report_complete(
      report: dict, accuracy: float
  ) -> dict:
      """Completes the sklearn classification report with accuracy xor micro avg.
  
      Args:
          report: Report generated by metrics.classification_report with output_dict=True
          accuracy: Model accuracy
  
      Raises:
          Exception: When sklearn.metrics.classification_report
              behaves different to our expectation.
  
      Returns:
          report: Report generated by metrics.classification_report
              enhanced with accuracy xor micro avg.
      """
      report = copy.deepcopy(report)
      if "accuracy" in report and "micro avg" not in report:
          # micro avg corresponds to accuracy in this case
          # and is the same for all metrics
          acc = report["accuracy"]
          support = report["macro avg"]["support"]
          report["micro avg"] = {
              "precision": acc,
              "recall": acc,
              "f1-score": acc,
              "support": support,
          }
      elif "accuracy" not in report and "micro avg" in report:
          # Due to provided labels, micro avg can have recall != precision
          # The accuracy therefore has to be inferred separately
          report["accuracy"] = accuracy
      else:
          raise ClassificationReportException(
              "This cannot happen according to classification_report's docs"
          )
      return report
  
imports: import copy
  import logging
  import os
  from typing import Text, Dict, Optional, List, Any, Iterable, Tuple, Union
  from pathlib import Path
  from rasa.core.agent import Agent
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  import rasa.shared.utils.cli
  import rasa.shared.utils.common
  import rasa.shared.utils.io
  import rasa.utils.common
  from rasa.constants import RESULTS_FILE, NUMBER_OF_TRAINING_STORIES_FILE
  from rasa.exceptions import ModelNotFound
  from rasa.shared.constants import DEFAULT_RESULTS_PATH
  import rasa.shared.nlu.training_data.loading
  from rasa.shared.data import TrainingType
  from rasa.shared.nlu.training_data.training_data import TrainingData
  import rasa.model
label_desc: Use image node_id 5 for calling a global function with example usage: make_classification_report_complete(report, accuracy) and returns: report