class_docstr: Pipeline wrapper with 'export_pipeline'/'import_pipeline' methods
  allowing user to upload a pipeline to JSON format and import it from JSON.
  
  :params pipeline: Pipeline object to export or empty Pipeline to import
class_docstr_tok: ["Pipeline","wrapper","with","'export_pipeline'\/'import_pipeline","'","methods","allowing","user","to","upload","a","pipeline","to","JSON","format","and","import","it","from","JSON",".",":","params","pipeline",":","Pipeline","object","to","export","or","empty","Pipeline","to","import"]
docstr: Generate pipeline description in a form of dictionary 
docstr_tok: ["Generate","pipeline","description","in","a","form","of","dictionary"]
code: def convert_to_dict(self, root_node: PipelineNode = None) -> dict:
      """Generate pipeline description in a form of dictionary"""
  
      json_nodes = list(
          map(
              lambda op_template: op_template.convert_to_dict(),
              self.operation_templates,
          )
      )
      for node in json_nodes:
          if "custom_params" in node and isinstance(
              node["custom_params"], dict
          ):
              for key in node["custom_params"]:
                  if isinstance(node["custom_params"][key], Callable):
                      node["custom_params"][key] = None
  
      # Store information about preprocessing
      preprocessing_path = ["preprocessing", "data_preprocessor.pkl"]
  
      json_object = {
          "total_pipeline_operations": list(
              self.total_pipeline_operations
          ),
          "depth": self.depth,
          "nodes": json_nodes,
          "preprocessing": preprocessing_path,
      }
      if root_node:
          json_object["descriptive_id"] = root_node.descriptive_id
  
      return json_object
  
imports: import json
  import os
  from collections import Counter
  from datetime import datetime
  from io import BytesIO
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union
  from uuid import uuid4
  import joblib
  import numpy
  from golem.core.log import default_log
  from fedot.core.operations.atomized_template import AtomizedModelTemplate
  from fedot.core.operations.operation_template import OperationTemplate, check_existing_path
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.repository.operation_types_repository import atomized_model_type
  from fedot.preprocessing.dummy_preprocessing import DummyPreprocessor
  from fedot.preprocessing.preprocessing import DataPreprocessor
label_desc: Use image node_id 5 for calling the PipelineTemplate obj's underlying member method code with example usage: obj.convert_to_dict(root_node) and returns: json_object