code: def get_rtf(
      psd_speech,
      psd_noise,
      mode="power",
      reference_vector: Union[int, torch.Tensor] = 0,
      iterations: int = 3,
      diagonal_loading: bool = True,
      diag_eps: float = 1e-7,
  ):
      """Calculate the relative transfer function (RTF).
  
      Args:
          psd_speech (torch.complex64):
              speech covariance matrix (..., F, C, C)
          psd_noise (torch.complex64):
              noise covariance matrix (..., F, C, C)
          mode (str): one of ("power", "evd")
              "power": power method
              "evd": eigenvalue decomposition
          reference_vector (torch.Tensor or int): (..., C) or scalar
          iterations (int): number of iterations in power method
      Returns:
          rtf (torch.complex64): (..., F, C)
      """
      if mode == "power":
          rtf = torchaudio.functional.rtf_power(
              psd_speech,
              psd_noise,
              reference_vector,
              n_iter=iterations,
              diagonal_loading=diagonal_loading,
              diag_eps=diag_eps,
          )
      elif mode == "evd":
          rtf = torchaudio.functional.rtf_evd(psd_speech)
      else:
          raise ValueError("Unknown mode: %s" % mode)
      return rtf
  
imports: from typing import List, Union
  import torch
  import torch_complex.functional
  import torchaudio
label_desc: Use image node_id 2 for calling a global function with example usage: get_rtf(psd_speech, psd_noise, mode, reference_vector, iterations, diagonal_loading, diag_eps) and returns: rtf