def METHOD_NAME(input_ch):
    criterion = FrequencyDomainAbsCoherence()
    complex_wrapper = torch.complex if is_torch_1_9_plus else ComplexTensor
    batch = 2
    shape = (batch, 10, 200) if input_ch == 1 else (batch, 10, input_ch, 200)
    inf_spec = complex_wrapper(torch.rand(*shape), torch.rand(*shape))
    ref_spec = complex_wrapper(torch.rand(*shape), torch.rand(*shape))
    with pytest.raises(ValueError):
        criterion(ref_spec.real, inf_spec)
    with pytest.raises(ValueError):
        if input_ch == 1:
            criterion(ref_spec[0], inf_spec[0])
        else:
            criterion(ref_spec[0, 0], inf_spec[0, 0])