code: def blind_analytic_normalization(ws, psd_noise, eps=1e-8):
      """Blind analytic normalization (BAN) for post-filtering
  
      Args:
          ws (torch.complex64): beamformer vector (..., F, C)
          psd_noise (torch.complex64): noise PSD matrix (..., F, C, C)
          eps (float)
      Returns:
          ws_ban (torch.complex64): normalized beamformer vector (..., F)
      """
      C2 = psd_noise.size(-1) ** 2
      denominator = torch.einsum(
          "...c,...ce,...e->...", ws.conj(), psd_noise, ws
      )
      numerator = torch.einsum(
          "...c,...ce,...eo,...o->...",
          ws.conj(),
          psd_noise,
          psd_noise,
          ws,
      )
      gain = (numerator + eps).sqrt() / (denominator * C2 + eps)
      return gain
  
imports: from typing import List, Union
  import torch
  import torch_complex.functional
  import torchaudio
label_desc: Use image node_id 13 for calling a global function with example usage: blind_analytic_normalization(ws, psd_noise, eps) and returns: gain