code: def _format_inputs(
      node: Node, graph_name: str
  ) -> Tuple[List[str], List[Any]]:
      """
      Format the inputs of a given node.
      Inputs will be formatted with ``_format_variable_name``
  
      Parameters
      ----------
      node : Node
          a graph node, get and format its inputs
      graph_name : str
          subgraph name, to format variable names
  
      Returns
      -------
      list
          the list of input names
      list
          the list of input values, if an input is simple type, record its value,
          otherwise the value is None
      """
      edges = _sorted_incoming_edges(node)
      inputs = []
      inputs_value = []
      for edge in edges:
          if edge.head.name == "_inputs":
              assert isinstance(edge.head_slot, int)
              if edge.head.operation.io_names is not None:
                  # when input has names, e.g., forward(self, tensor1, tensor2, another_one)
                  inputs.append(
                      _format_variable_name(
                          edge.head.operation.io_names[edge.head_slot],
                          graph_name,
                      )
                  )
              else:
                  # when input has no name, e.g., forward(*_inputs)
                  inputs.append("_inputs[{}]".format(edge.head_slot))
              inputs_value.append(None)
          else:
              if edge.head_slot is None:
                  # when the input comes from a single-output operator
                  inputs.append(
                      _format_variable_name(edge.head.name, graph_name)
                  )
                  if (
                      edge.head.operation.type
                      in ("prim::Constant", "prim::GetAttr")
                      and "value" in edge.head.operation.parameters
                  ):
                      inputs_value.append(
                          edge.head.operation.parameters["value"]
                      )
                  else:
                      inputs_value.append(None)
              else:
                  # when the input comes from a multi-output operator: needs to know which one it comes from
                  inputs.append(
                      "{}[{}]".format(
                          _format_variable_name(
                              edge.head.name, graph_name
                          ),
                          edge.head_slot,
                      )
                  )
                  inputs_value.append(None)
      return inputs, inputs_value
  
file_path: nni/nni/nas/space/pytorch/codegen.py
imports: import logging
  import re
  from typing import Dict, List, Tuple, Any, cast
  from nni.common.device import Device, GPUDevice
  from nni.nas.space.graph import IllegalGraphError, Edge, Graph, Node, GraphModelSpace
  from nni.nas.space.graph_op import PyTorchOperation
  from nni.nas.utils import STATE_DICT_PY_MAPPING
  from .op_def import ToDevice
label_desc: Use image node_id 3 for calling a global function with example usage: _format_inputs(node, graph_name) and returns: inputs,  inputs_value