def fft_canonicalize_length_dim(
    input_data: Var, length: Optional[Var], dim: Optional[Var], c2r: bool = False
) -> Tuple[int, int]:
    """
    Canonicalize shape and dim for 1-D FFT (based on PyTorch's fft documentation):
    - length: Signal length. If given, the input will either be zero-padded or trimmed to this
      length before computing the FFT.
    - dim: The dimension along which to take the one dimensional FFT.
    - c2r: Use for "complex to real", such as irfft, which takes complex and output real data.
    """
    shapes, dims = fft_canonicalize_shapes_dims(input_data, length, dim, c2r)
    return shapes[0], dims[0]

    Canonicalize shape and dim for 1-D FFT (based on PyTorch's fft documentation):
    - length: Signal length. If given, the input will either be zero-padded or trimmed to this
      length before computing the FFT.
    - dim: The dimension along which to take the one dimensional FFT.
    - c2r: Use for "complex to real", such as irfft, which takes complex and output real data.
    
coremltools/converters/mil/mil/ops/defs/complex_dialect_ops.py