code: def test_pipelines_adapt_properly(pipeline):
      adapter = PipelineAdapter()
      verifier = GraphVerifier(DEFAULT_DAG_RULES)
  
      assert all(
          isinstance(node, PipelineNode) for node in pipeline.nodes
      )
      assert _check_nodes_references_correct(pipeline)
      assert verifier(pipeline)
  
      opt_graph = adapter.adapt(pipeline)
  
      assert all(
          isinstance(node, OptNode) for node in opt_graph.nodes
      )  # checking strict type equality!
      assert _check_nodes_references_correct(opt_graph)
      assert verifier(opt_graph)
  
imports: from copy import deepcopy
  from random import choice
  import numpy
  import pytest
  from golem.core.dag.graph_node import GraphNode
  from golem.core.dag.graph_verifier import GraphVerifier
  from golem.core.dag.verification_rules import DEFAULT_DAG_RULES
  from golem.core.optimisers.graph import OptNode
  from fedot.core.operations.operation import Operation
  from fedot.core.pipelines.adapters import PipelineAdapter
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.pipeline_builder import PipelineBuilder
  from test.unit.dag.test_graph_utils import find_first
  from test.unit.tasks.test_regression import get_synthetic_regression_data
label_desc: Use image node_id 7 for calling a global function with example usage: test_pipelines_adapt_properly(pipeline) without return types