code: def _matmul_backward(input, weight, grad_output):
      """Implements matmul backward from crypten.gradients
  
      This is necessary here because the forward in DPSplitModel is performed in plaintext
      and does not appear on the CrypTen autograd tape, so we do not have a saved ctx.
  
      Only returns gradient w.r.t. weight since that is all we need in this context.
      """
      # Cache sizes for inverse_broadcast
      weight_size = weight.t().size()
  
      # Deal with vectors that are represented by a
      # < 2 dimensional tensor
      if input.dim() < 2:
          input = input.unsqueeze(0)
          grad_output = grad_output.unsqueeze(0)
  
      if weight.dim() < 2:
          weight = weight.unsqueeze(1)
          grad_output = grad_output.unsqueeze(1)
  
      # Compute gradients
      weight_grad = input.transpose(-2, -1).matmul(grad_output)
  
      # Fix gradient sizes for vector inputs
      if len(weight_size) < 2:
          weight_grad = weight_grad.squeeze()
          if weight_grad.dim() < 1:
              weight_grad = weight_grad.unsqueeze(0)
  
      # Return weight grad
      weight_grad = _inverse_broadcast(weight_grad, weight_size).t()
      return weight_grad / weight_grad.size(0)
  
imports: import fate.arch.protocol.mpc.communicator
  import torch
  import torch.nn
  from fate.arch.protocol.mpc.config import cfg
label_desc: Use image node_id 1 for calling a global function with example usage: _matmul_backward(input, weight, grad_output) and returns: unknown