torch.fx.experimental.optimization.matches_module_pattern torch.fx.experimental.optimization.matches_module_pattern(pattern, node, modules) Return type: bool