class_docstr: Optimization adapter for Pipeline<->OptGraph translation.
  It does 2 things:
  - on restore: recreate Pipeline Nodes from information stored in OptNodes
  - on adapt: create light-weight OptGraph (without 'heavy' data like
      fitted models) that can be used for reconstructing Pipelines.
class_docstr_tok: ["Optimization","adapter","for","Pipeline","<","-",">","OptGraph","translation",".","It","does","2","things",":","-","on","restore",":","recreate","Pipeline","Nodes","from","information","stored","in","OptNodes","-","on","adapt",":","create","light-weight","OptGraph","(","without","'heavy","'","data","like","fitted","models",")","that","can","be","used","for","reconstructing","Pipelines","."]
code: def _restore(
      self,
      opt_graph: OptGraph,
      metadata: Optional[Dict[str, Any]] = None,
  ) -> Pipeline:
      restored_nodes = map_dag_nodes(
          self._transform_to_pipeline_node, opt_graph.nodes
      )
      pipeline = Pipeline(
          restored_nodes,
          use_input_preprocessing=self.use_input_preprocessing,
      )
  
      metadata = metadata or {}
      pipeline.computation_time = metadata.get(
          "computation_time_in_seconds"
      )
  
      return pipeline
  
file_path: FEDOT/fedot/core/pipelines/adapters.py
imports: from copy import deepcopy
  from typing import Any, Optional, Dict
  from golem.core.adapter import BaseOptimizationAdapter
  from golem.core.dag.graph_utils import map_dag_nodes
  from golem.core.optimisers.graph import OptGraph, OptNode
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
label_desc: Use image node_id 5 for calling the PipelineAdapter obj's underlying member method code with example usage: obj._restore(opt_graph, metadata) and returns: pipeline