class_docstr: Class for performing pipeline structure exploration.
  The class allows you to convert pipelines into a networkx graph and considers
  all possible paths from primary PipelineNode (or primary PipelineNodes) to root node. If at least
  one of the paths contains an invalid sequence of operations, the search performed
  by this class will detect it
class_docstr_tok: ["Class","for","performing","pipeline","structure","exploration",".","The","class","allows","you","to","convert","pipelines","into","a","networkx","graph","and","considers","all","possible","paths","from","primary","PipelineNode","(","or","primary","PipelineNodes",")","to","root","node",".","If","at","least","one","of","the","paths","contains","an","invalid","sequence","of","operations",",","the","search","performed","by","this","class","will","detect","it"]
docstr: Checking the path for operations take right places in the pipeline.
  
  :param graph: graph for checking paths
  :param path: path in the graph from primary PipelineNode to root
  :param tag_to_check: find appropriate operation by desired tag
docstr_tok: ["Checking","the","path","for","operations","take","right","places","in","the","pipeline",".",":","param","graph",":","graph","for","checking","paths",":","param","path",":","path","in","the","graph","from","primary","PipelineNode","to","root",":","param","tag_to_check",":","find","appropriate","operation","by","desired","tag"]
code: def check_path(
      graph: nx.DiGraph, path: list, tag_to_check: str
  ) -> Dict[str, Any]:
      """
      Checking the path for operations take right places in the pipeline.
  
      :param graph: graph for checking paths
      :param path: path in the graph from primary PipelineNode to root
      :param tag_to_check: find appropriate operation by desired tag
      """
      (
          operation_path,
          is_appropriate_operation,
          is_independent_operation,
      ) = PipelineStructureExplorer._calculate_binary_paths(
          graph, path, tag_to_check
      )
  
      # Define is branch correct or not
      is_branch_correct = (
          PipelineStructureExplorer.is_current_branch_correct(
              is_appropriate_operation,
              is_independent_operation,
              len(path),
          )
      )
  
      path_info = {
          "correctness": is_branch_correct,
          "path": operation_path,
      }
  
      return path_info
  
file_path: FEDOT/fedot/preprocessing/structure.py
imports: from typing import Tuple, List, Dict, Any
  import networkx
  import numpy
  import pandas
  from golem.core.dag.convert import graph_structure_as_nx_graph
label_desc: Use image node_id 2 for calling the PipelineStructureExplorer obj's underlying member method code with example usage: obj.check_path(graph, path, tag_to_check) and returns: path_info