code: def zero_diag(mat: torch.Tensor) -> torch.Tensor:
      """
      Set the diagonal of a matrix to 0
  
      Parameters
      ----------
      mat
          A 2D square matrix
  
      Returns
      -------
      A 2D square matrix with zeros along the diagonal
      """
      return mat - torch.diag(mat.diag())
  
imports: import logging
  from typing import Type
  from alibi_detect.utils._types import TorchDeviceType
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: zero_diag(mat) and returns: unknown