code: def create_prim_constant_node(self, ir_graph, node, module_name):
      # NOTE: compare with string not type, because the type is defined in pytorch C code.
      # `.kind()` can also be used here
      if node.outputsAt(0).type().str() == "None":
          attrs = {"type": "None"}
      else:
          attrs = {
              "type": node.outputsAt(0).type().str(),
              "value": node.outputsAt(0).toIValue(),
          }
      self.global_seq += 1
      new_node = ir_graph.add_node(
          build_full_name(
              module_name, OpTypeName.Constant, self.global_seq
          ),
          node.kind(),
          attrs,
      )
      return new_node
  
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 4 for calling the GraphConverter obj's underlying member method code with example usage: obj.create_prim_constant_node(ir_graph, node, module_name) and returns: new_node