def is_asteroid_complex(tensor, dim: int = -2):
    """Check if tensor is complex-like in a given dimension.

    Args:
        tensor (torch.Tensor): tensor to be checked.
        dim(int): the frequency (or equivalent) dimension along which
            real and imaginary values are concatenated.

    Returns:
        True if dimension is even in the specified dimension, otherwise False

    """
    return tensor.shape[dim] % 2 == 0