docstr: if there is aten::slice node, merge the consecutive ones together.
  ```x[:, :, 1:, 1:]``` in python code will be converted into 4 node in torch script,
  each node has 5 inputs: tensor, dim, x, y, z (i.e., x:y:z)
docstr_tok: ["if","there","is","aten",":",":slice","node",",","merge","the","consecutive","ones","together",".","``","`","x","[",":",",",":",",","1",":",",","1",":","]","``","`","in","python","code","will","be","converted","into","4","node","in","torch","script",",","each","node","has","5","inputs",":","tensor",",","dim",",","x",",","y",",","z","(","i.e.",",","x",":","y",":","z",")"]
code: def merge_aten_slices(self, ir_graph):
      """
      if there is aten::slice node, merge the consecutive ones together.
      ```x[:, :, 1:, 1:]``` in python code will be converted into 4 node in torch script,
      each node has 5 inputs: tensor, dim, x, y, z (i.e., x:y:z)
      """
      head_slice_nodes = []
      has_slice_node = False
      for node in ir_graph.hidden_nodes:
          if node.operation.type == "aten::slice":
              has_slice_node = True
              for pred in node.predecessors:
                  if pred.operation.type not in [
                      "aten::slice",
                      "prim::Constant",
                  ]:
                      head_slice_nodes.append(node)
                      break
      if has_slice_node:
          assert head_slice_nodes
  
      for head_node in head_slice_nodes:
          slot = 0
          new_slice_node = ir_graph.add_node(
              build_full_name(head_node.name, "merged"),
              OpTypeName.MergedSlice,
          )
          if len(head_node.incoming_edges) == 4:
              # when slice is for one dimension list, there are only 4 inputs, thus merge is not needed
              for edge in head_node.incoming_edges:
                  edge.tail = new_slice_node
              for edge in head_node.outgoing_edges:
                  edge.head = new_slice_node
              ir_graph.hidden_nodes.remove(head_node)
              break
          assert len(head_node.incoming_edges) == 5
          for edge in head_node.incoming_edges:
              edge.tail = new_slice_node
          slot += 5
          node = head_node
          while (
              len(node.successors) == 1
              and node.successors[0].operation.type == "aten::slice"
          ):
              suc_node = node.successors[0]
              assert len(suc_node.incoming_edges) == 5
              for edge in suc_node.incoming_edges:
                  if edge.tail_slot == 0:
                      edge.remove()
                  else:
                      edge.tail = new_slice_node
                      edge.tail_slot = slot + edge.tail_slot - 1
              slot += 4
              ir_graph.hidden_nodes.remove(node)
              node = suc_node
  
          for edge in node.outgoing_edges:
              edge.head = new_slice_node
          ir_graph.hidden_nodes.remove(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 9 for calling the GraphConverter obj's underlying member method code with example usage: obj.merge_aten_slices(ir_graph) without return types