code: def extract_subtree_root(
      root_operation_id: int, pipeline_template: PipelineTemplate
  ):
      root_node = [
          operation_template
          for operation_template in pipeline_template.operation_templates
          if operation_template.operation_id == root_operation_id
      ][0]
      root_node = pipeline_template.roll_pipeline_structure(
          root_node, {}
      )
  
      return root_node
  
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 1 for calling a global function with example usage: extract_subtree_root(root_operation_id, pipeline_template) and returns: root_node