code: def _add_edge_handle_source_node(
      self, _input, graph_inputs, ir_graph, output_remap, node_index
  ):
      if _input in output_remap:
          assert output_remap[_input].kind() == "aten::append"
          predecessor_node = output_remap[_input]
          assert (
              predecessor_node in node_index
          ), "predecessor node: {}".format(predecessor_node)
          src_node_idx = None
          src_node = node_index[predecessor_node]
          assert isinstance(src_node, Node)
      elif _input in graph_inputs:
          idx = graph_inputs.index(_input)
          src_node = ir_graph.input_node
          src_node_idx = idx
      else:
          predecessor_node = _input.node()
          assert (
              predecessor_node in node_index
          ), "predecessor node: {}".format(predecessor_node)
          # find out the index of _input in the outputs of predecessor_node
          predecessor_outputs = [
              _output for _output in predecessor_node.outputs()
          ]
          if len(predecessor_outputs) == 1:
              idx = None
          else:
              idx = predecessor_outputs.index(_input)
          ir_predecessor_node = node_index[predecessor_node]
          src_node_idx = idx
          assert isinstance(ir_predecessor_node, Node)
          src_node = ir_predecessor_node
      return src_node, src_node_idx
  
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 2 for calling the GraphConverter obj's underlying member method code with example usage: obj._add_edge_handle_source_node(_input, graph_inputs, ir_graph, output_remap, node_index) and returns: src_node,  src_node_idx