code: def test_psd(self, use_mask):
      specgram = torch.rand(4, 10, 5, dtype=torch.cfloat)
      if use_mask:
          mask = torch.rand(10, 5)
      else:
          mask = None
      self.assert_grad(F.psd, (specgram, mask))
  
imports: from functools import partial
  from typing import Callable, Tuple
  import torch
  import torchaudio.functional
  from parameterized import parameterized
  from torch import Tensor
  from torch.autograd import gradcheck, gradgradcheck
  from torchaudio_unittest.common_utils import get_spectrogram, get_whitenoise, nested_params, rnnt_utils, TestBaseMixin, use_deterministic_algorithms
label_desc: Use image node_id 27 for calling the Autograd obj's underlying member method code with example usage: obj.test_psd(use_mask) without return types