docstr: Parameters
  ----------
  ir_graph : Graph
  node : torch._C.Node
  graph_inputs : List[torch._C.Value]
      a list of a script graph's inputs
  node_index : Dict
  new_node : Node
      newly created ir node corresponding to `node`
  output_remap : Dict
  ignore_first : bool
      if it is true, skip the first input
docstr_tok: ["Parameters","--","--","--","--","--","ir_graph",":","Graph","node",":","torch._C.Node","graph_inputs",":","List","[","torch._C.Value","]","a","list","of","a","script","graph","'s","inputs","node_index",":","Dict","new_node",":","Node","newly","created","ir","node","corresponding","to","`","node","`","output_remap",":","Dict","ignore_first",":","bool","if","it","is","true",",","skip","the","first","input"]
code: def _add_edge(
      self,
      ir_graph,
      node,
      graph_inputs,
      node_index,
      new_node,
      output_remap,
      ignore_first=False,
  ):
      """
      Parameters
      ----------
      ir_graph : Graph
      node : torch._C.Node
      graph_inputs : List[torch._C.Value]
          a list of a script graph's inputs
      node_index : Dict
      new_node : Node
          newly created ir node corresponding to `node`
      output_remap : Dict
      ignore_first : bool
          if it is true, skip the first input
      """
      is_single_input = (
          len([_input for _input in node.inputs()])
          - (1 if ignore_first else 0)
      ) == 1
      new_node_input_idx = 0
      for _input in node.inputs():
          if ignore_first:
              ignore_first = False
              continue
          # handle source node
          src_node, src_node_idx = self._add_edge_handle_source_node(
              _input, graph_inputs, ir_graph, output_remap, node_index
          )
          # handle destination node
          dst_node = new_node
          if is_single_input:
              dst_node_idx = None
          else:
              dst_node_idx = new_node_input_idx
          # create edge
          ir_graph.add_edge(
              head=(src_node, src_node_idx),
              tail=(dst_node, dst_node_idx),
          )
  
          new_node_input_idx += 1
  
imports: import re
  import torch
  from nni.nas.space.graph import Graph, GraphModelSpace, Node, Cell, Operation
  from nni.nas.nn.pytorch import InputChoice, MutationAnchor, LayerChoice, MutableModule, Repeat
  from nni.nas.utils import get_init_parameters_or_fail, get_importable_name
  from .op_types import MODULE_EXCEPT_LIST, OpTypeName
  from .utils import _convert_name, build_full_name, _without_shape_info, _extract_info_from_trace_node, get_full_name_by_scope_name, is_layerchoice_node, match_node, build_cand_name, build_python_name
label_desc: Use image node_id 3 for calling the GraphConverter obj's underlying member method code with example usage: obj._add_edge(ir_graph, node, graph_inputs, node_index, new_node, output_remap, ignore_first) without return types