code: def rewrite_graph(self, pattern_names, graph_type):
      from six import string_types as _string_types
  
      if isinstance(pattern_names, _string_types):
          pattern_names = [pattern_names]
      elif not isinstance(pattern_names, list):
          raise ValueError
      for pattern_name in pattern_names:
          self._rewrite_graph_by_pattern(pattern_name, graph_type)
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from tensorflow.python.framework import tensor_util
  from tensorflow.core.framework import attr_value_pb2
  import sys
  from mmdnn.conversion.tensorflow.tensorflow_graph import *
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.rewriter.graph_matcher import *
  from mmdnn.conversion.common.DataStructure import *
  from tensorflow.core.framework.node_def_pb2 import NodeDef
  from mmdnn.conversion.rewriter.rnn_utils import *
label_desc: Use image node_id 3 for calling the UnitRewriterBase obj's underlying member method code with example usage: obj.rewrite_graph(pattern_names, graph_type) without return types