code: def complex_norm(
      c: Union[torch.Tensor, ComplexTensor], dim=-1, keepdim=False
  ) -> torch.Tensor:
      if not is_complex(c):
          raise TypeError("Input is not a complex tensor.")
      if is_torch_complex_tensor(c):
          return torch.norm(c, dim=dim, keepdim=keepdim)
      else:
          if dim is None:
              return torch.sqrt((c.real**2 + c.imag**2).sum() + EPS)
          else:
              return torch.sqrt(
                  (c.real**2 + c.imag**2).sum(
                      dim=dim, keepdim=keepdim
                  )
                  + EPS
              )
  
file_path: espnet/espnet2/enh/layers/complex_utils.py
imports: from typing import Sequence, Tuple, Union
  import torch
  from torch_complex import functional
  from torch_complex.tensor import ComplexTensor
label_desc: Use image node_id 8 for calling a global function with example usage: complex_norm(c, dim, keepdim) and returns: torch, torch, torch