def check_graph(self, graph, skip_pattern=None):
    ops = graph.all_op_nodes()
    for op_node in ops:
        if (op_node.name() in self._target_ops):
            user_skipped = False
            if isinstance(skip_pattern, list):
                user_skipped = (op_node.op().has_attr('op_namescope') and any(((pattern in op_node.op().attr('op_namescope')) for pattern in skip_pattern)))
            elif isinstance(skip_pattern, str):
                user_skipped = (op_node.op().has_attr('op_namescope') and (op_node.op().attr('op_namescope').find(skip_pattern) != (- 1)))
            if user_skipped:
                continue
            in_nodes_all_not_persistable = True
            for input_name in op_node.input_arg_names():
                in_node = graph._find_node_by_name(op_node.inputs, input_name)
                in_nodes_all_not_persistable = (in_nodes_all_not_persistable and (not in_node.persistable()))
            if (not in_nodes_all_not_persistable):
                continue
            input_names = op_node.input_arg_names()
            for input_name in input_names:
                self.assertTrue(input_name.endswith('.quant_dequant'))
def check_graph(self, graph, skip_pattern=None):
    ops = graph.all_op_nodes()
    for op_node in ops:
        if (op_node.name() in self._target_ops):
            user_skipped = False
            if isinstance(skip_pattern, list):
                user_skipped = (op_node.op().has_attr('op_namescope') and any(((pattern in op_node.op().attr('op_namescope')) for pattern in skip_pattern)))
            elif isinstance(skip_pattern, str):
                user_skipped = (op_node.op().has_attr('op_namescope') and (op_node.op().attr('op_namescope').find(skip_pattern) != (- 1)))
            if user_skipped:
                continue
            in_nodes_all_not_persistable = True
            for input_name in op_node.input_arg_names():
                in_node = graph._find_node_by_name(op_node.inputs, input_name)
                in_nodes_all_not_persistable = (in_nodes_all_not_persistable and (not in_node.persistable()))
            if (not in_nodes_all_not_persistable):
                continue
            input_names = op_node.input_arg_names()
            for input_name in input_names:
                self.assertTrue(input_name.endswith('.quant_dequant'))