def METHOD_NAME():
    x, y = vectors("xy")
    @graph_rewriter
    def custom_rewrite(fgraph):
        fgraph.replace(x, y, import_missing=True)
    x_rewritten = rewrite_graph(x, custom_rewrite=custom_rewrite)
    assert x_rewritten is y
    x_rewritten = rewrite_graph(
        FunctionGraph(outputs=[x], clone=False), custom_rewrite=custom_rewrite
    )
    assert x_rewritten.outputs[0] is y