code: def clear_masks(model: torch.nn.Module):
      r"""Clear all masks from the model."""
      for module in model.modules():
          if isinstance(module, MessagePassing):
              if module.explain is True:
                  module.explain = None
              module._edge_mask = None
              module._loop_mask = None
              module._apply_sigmoid = True
      return module
  
file_path: pytorch_geometric/torch_geometric/explain/algorithm/utils.py
imports: from typing import Dict, Union
  import torch
  from torch import Tensor
  from torch.nn import Parameter
  from torch_geometric.nn import MessagePassing
  from torch_geometric.typing import EdgeType
label_desc: Use image node_id 3 for calling a global function with example usage: clear_masks(model) and returns: module