code: def test_einsum(real_vec):
      if is_torch_1_9_plus:
          wrappers = [ComplexTensor, torch.complex]
          modules = [FC, torch]
      else:
          wrappers = [ComplexTensor]
          modules = [FC]
  
      for complex_wrapper, complex_module in zip(wrappers, modules):
          mat = complex_wrapper(
              torch.rand(2, 3, 3), torch.rand(2, 3, 3)
          )
          if real_vec:
              vec = torch.rand(2, 3, 1)
              vec2 = complex_wrapper(vec, torch.zeros_like(vec))
          else:
              vec = complex_wrapper(
                  torch.rand(2, 3, 1), torch.rand(2, 3, 1)
              )
              vec2 = vec
          ret = einsum("bec,bcf->bef", mat, vec)
          ret2 = complex_module.einsum("bec,bcf->bef", mat, vec2)
          assert complex_module.allclose(ret, ret2)
  
file_path: espnet/test/espnet2/enh/layers/test_complex_utils.py
imports: import numpy
  import pytest
  import torch
  import torch_complex.functional
  from packaging.version import parse
  from torch_complex.tensor import ComplexTensor
  from espnet2.enh.layers.complex_utils import cat, complex_norm, einsum, inverse, matmul, solve, stack, trace
label_desc: Use image node_id 3 for calling a global function with example usage: test_einsum(real_vec) without return types