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: Imports pipeline from source into the :attr:`link_to_empty_pipeline`
  
  :param source: where to load the pipeline from: can be specified as dict or as str
  :param dict_fitted_operations: dictionary of the fitted operations
docstr_tok: ["Imports","pipeline","from","source","into","the",":","attr",":","`","link_to_empty_pipeline","`",":","param","source",":","where","to","load","the","pipeline","from",":","can","be","specified","as","dict","or","as","str",":","param","dict_fitted_operations",":","dictionary","of","the","fitted","operations"]
code: def import_pipeline(
      self,
      source: Union[str, dict],
      dict_fitted_operations: Optional[dict] = None,
  ):
      """
      Imports pipeline from source into the :attr:`link_to_empty_pipeline`
  
      :param source: where to load the pipeline from: can be specified as dict or as str
      :param dict_fitted_operations: dictionary of the fitted operations
      """
      path_to_json_pipe = None
  
      if source is None:
          raise ValueError("Cannot import pipeline: the source is None")
      elif isinstance(source, dict):
          json_object_pipeline = source
          self.log.debug("The pipeline was imported from dict.")
      else:
          path = os.path.abspath(source)
          if os.path.isdir(path):
              path_to_json_pipe = None
              for file in os.listdir(path):
                  if file.endswith(".json"):
                      path_to_json_pipe = os.path.join(path, file)
              if not path_to_json_pipe:
                  raise FileNotFoundError(
                      "Path to pipeline is incorrect"
                  )
          else:
              path_to_json_pipe = path
  
          with open(path_to_json_pipe) as json_file:
              json_object_pipeline = json.load(json_file)
              self.log.debug(
                  f"The pipeline was imported from the path: {path_to_json_pipe}."
              )
  
      self._extract_operations(json_object_pipeline, path_to_json_pipe)
      self.convert_to_pipeline(
          self.link_to_empty_pipeline,
          path_to_json_pipe,
          dict_fitted_operations,
      )
      self.depth = self.link_to_empty_pipeline.depth
  
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 9 for calling the PipelineTemplate obj's underlying member method code with example usage: obj.import_pipeline(source, dict_fitted_operations) without return types