code: def convert(self, logical_plan: LogicalPlan) -> None:
      nodes_to_skip = set()
      while True:  # repeat until the logical_graph converges
          input_nodes = logical_plan.logical_graph.get_nodes_by_type(
              "_inputs"
          )
          # _PseudoOperation(type_name="_inputs"))
          root_node = None
          for node in input_nodes:
              if node in nodes_to_skip:
                  continue
              root_node = node
              break
          if root_node is None:
              break  # end of convert
          else:
              nodes_to_dedup = []
              for node in input_nodes:
                  if node in nodes_to_skip:
                      continue
                  if self._check_deduplicate_by_node(root_node, node):
                      nodes_to_dedup.append(node)
              assert len(nodes_to_dedup) >= 1
              if len(nodes_to_dedup) == 1:
                  assert nodes_to_dedup[0] == root_node
                  nodes_to_skip.add(root_node)
              else:
                  dedup_node = DedupInputNode(
                      logical_plan.logical_graph, uid(), nodes_to_dedup
                  )._register()
                  for edge in logical_plan.logical_graph.edges:
                      if edge.head in nodes_to_dedup:
                          edge.head = dedup_node
                      if edge.tail in nodes_to_dedup:
                          edge.tail = dedup_node
                  for node in nodes_to_dedup:
                      node.remove()
  
file_path: nni/nni/nas/execution/cgo/logical_optimizer/opt_dedup_input.py
imports: from typing import List, Dict, Tuple, cast
  from nni.mutable.utils import uid
  from nni.common.device import GPUDevice
  from nni.nas.space import GraphModelSpace, Graph, Node
  from .interface import AbstractOptimizer
  from .logical_plan import AbstractLogicalNode, LogicalGraph, LogicalPlan, OriginNode
label_desc: Use image node_id 4 for calling the DedupInputOptimizer obj's underlying member method code with example usage: obj.convert(logical_plan) without return types