def METHOD_NAME(self):
    """
    Test remove nodes by given type
    """
    model = models_for_tests.build_dummy_model()
    node_ls = [node.op_type for node in model.graph.node]
    assert node_ls == ['Conv', 'Relu', 'MaxPool', 'Flatten', 'Gemm']
    # Remove first layer of dummy model
    utils.remove_nodes_with_type('Conv', model.graph)
    new_node_ls = [node.op_type for node in model.graph.node]
    assert new_node_ls == ['Relu', 'MaxPool', 'Flatten', 'Gemm']
    # Remove last layer of dummy model
    utils.remove_nodes_with_type('Gemm', model.graph)
    new_node_ls = [node.op_type for node in model.graph.node]
    assert new_node_ls == ['Relu', 'MaxPool', 'Flatten']
    # Check connection of each layer
    onnx.checker.check_model(model)