code: def test_dptnet_separator_forward_backward_complex(
      input_dim,
      post_enc_relu,
      rnn_type,
      bidirectional,
      num_spk,
      unit,
      att_heads,
      dropout,
      activation,
      norm_type,
      layer,
      segment_size,
      nonlinear,
  ):
      model = DPTNetSeparator(
          input_dim=input_dim,
          post_enc_relu=post_enc_relu,
          rnn_type=rnn_type,
          bidirectional=bidirectional,
          num_spk=num_spk,
          unit=unit,
          att_heads=att_heads,
          dropout=dropout,
          activation=activation,
          norm_type=norm_type,
          layer=layer,
          segment_size=segment_size,
          nonlinear=nonlinear,
      )
      model.train()
  
      real = torch.rand(2, 10, input_dim)
      imag = torch.rand(2, 10, input_dim)
      x = ComplexTensor(real, imag)
      x_lens = torch.tensor([10, 8], dtype=torch.long)
  
      masked, flens, others = model(x, ilens=x_lens)
  
      assert isinstance(masked[0], ComplexTensor)
      assert len(masked) == num_spk
  
      masked[0].abs().mean().backward()
  
file_path: espnet/test/espnet2/enh/separator/test_dptnet_separator.py
imports: import pytest
  import torch
  from torch import Tensor
  from torch_complex import ComplexTensor
  from espnet2.enh.separator.dptnet_separator import DPTNetSeparator
label_desc: Use image node_id 1 for calling a global function with example usage: test_dptnet_separator_forward_backward_complex(input_dim, post_enc_relu, rnn_type, bidirectional, num_spk, unit, att_heads, dropout, activation, norm_type, layer, segment_size, nonlinear) without return types