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: Set additional information (operation name and node type) to nodes as attributes.
  There is also preparing pandas DataFrame with such information
  
  :param node_labels: dictionary with ids and operation names
docstr_tok: ["Set","additional","information","(","operation","name","and","node","type",")","to","nodes","as","attributes",".","There","is","also","preparing","pandas","DataFrame","with","such","information",":","param","node_labels",":","dictionary","with","ids","and","operation","names"]
code: def _enrich_with_information(
      graph: nx.DiGraph, node_labels: dict
  ) -> Tuple[nx.DiGraph, pd.DataFrame]:
      """
      Set additional information (operation name and node type) to nodes as attributes.
      There is also preparing pandas DataFrame with such information
  
      :param node_labels: dictionary with ids and operation names
      """
      # Set names to nodes and additional info
      number_of_out_edges = graph.degree._nodes
      number_of_in_edges = graph.in_edges._adjdict
  
      info_df = []
      for node_id, node_label in node_labels.items():
          parent_numbers = len(number_of_in_edges[node_id])
          child_numbers = len(number_of_out_edges[node_id])
  
          if parent_numbers == 0:
              node_type = "primary"
          else:
              if child_numbers == 0:
                  # It is final node in the pipeline
                  node_type = "root"
              else:
                  node_type = "secondary"
  
          attrs = {
              node_id: {"operation": node_label, "type": node_type}
          }
          nx.set_node_attributes(graph, attrs)
  
          info_df.append(
              [
                  node_id,
                  node_type,
                  node_label,
                  parent_numbers,
                  child_numbers,
              ]
          )
  
      info_df = pd.DataFrame(
          info_df,
          columns=[
              "node_id",
              "node_type",
              "node_label",
              "parent_number",
              "child_number",
          ],
      )
      return graph, info_df
  
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 3 for calling the PipelineStructureExplorer obj's underlying member method code with example usage: obj._enrich_with_information(graph, node_labels) and returns: graph,  info_df