def acc_replace_reshape_ops(
    module: torch.fx.GraphModule,
) -> torch.fx.GraphModule:
    """
    Change TensorMetadata to shapeMetadata which only contains shape field.
    """
    for n in module.graph.nodes:
        if n.op == "call_function" and n.target == acc_ops.reshape:
            if isinstance(n.kwargs["acc_out_ty"], TensorMetadata):

                class shapeMetadata(NamedTuple):
                    shape: torch.Size

                node = n
                with module.graph.inserting_after(node):
                    new_kargs = {}
                    new_kargs["input"] = node.kwargs["input"]
                    new_kargs["acc_out_ty"] = shapeMetadata(
                        node.kwargs["acc_out_ty"].shape
                    )
                    new_node = module.graph.create_node(
                        "call_function",
                        acc_ops.reshape,
                        args=node.args,
                        kwargs=new_kargs,
                    )
                    node.replace_all_uses_with(new_node)
                    module.graph.erase_node(node)
    module.graph.eliminate_dead_code()
    module.recompile()
    return module

    Change TensorMetadata to shapeMetadata which only contains shape field.
    
fx2ait/fx2ait/passes/lower_basic_pass_aten.py