docstr: Do the following process to simplify graph:
  1. remove unconnected constant node
  2. remove unconnected getattr node
docstr_tok: ["Do","the","following","process","to","simplify","graph",":","1.","remove","unconnected","constant","node","2.","remove","unconnected","getattr","node"]
code: def refine_graph(self, ir_graph):
      """
      Do the following process to simplify graph:
      1. remove unconnected constant node
      2. remove unconnected getattr node
      """
      # some constant is not used, for example, function name as prim::Constant
      self.remove_unconnected_nodes(
          ir_graph, targeted_type="prim::Constant"
      )
      self.remove_unconnected_nodes(
          ir_graph, targeted_type="prim::GetAttr"
      )
      self.merge_aten_slices(ir_graph)
  
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 10 for calling the GraphConverter obj's underlying member method code with example usage: obj.refine_graph(ir_graph) without return types