class_docstr: A floder to fold a graph' nodes which has same scope into one node.
class_docstr_tok: ["A","floder","to","fold","a","graph","'","nodes","which","has","same","scope","into","one","node","."]
code: def _fold(self, scope_list, scope_name, level, sub_level):
      top_node = None
      # get sub_scopes
      if not self.scope_level_name_map.get(sub_level, 0):
          raise ValueError("The fold level exceed maxium scope level.")
      sub_scopes = self.scope_level_name_map[sub_level]
  
      for sub_scope in sub_scopes:
          sub_scope_node_name_list = self._get_scope_name_dict(
              self._graph.topological_sort,
              top_level=level,
              top_scope=scope_name,
              sub_level=sub_level,
              sub_scope=sub_scope,
          )
          for scope_list in sub_scope_node_name_list.values():
              top_node = self._graph.get_node(scope_list[-1])
              self._create_scope_node(sub_scope, scope_list, top_node)
  
file_path: MMdnn/mmdnn/conversion/rewriter/folder.py
imports: from mmdnn.conversion.common.IR.IR_graph import *
  import sys
  import re
  import numpy
  import collections
label_desc: Use image node_id 3 for calling the Folder obj's underlying member method code with example usage: obj._fold(scope_list, scope_name, level, sub_level) without return types