node (torch.fx.Node): a torch.fx.Node object in the fx computation graph
Returns:
torch.nn.Module: the module associated with the given node
"""
assertnode.graph.owning_moduleisnotNone,'Cannot find the owning_module for node.graph, please make sure the graph is associated with a GraphModule object'
assertnode.op=='call_module',f'Expected node.op to be call_module, but found {node.op}'