def normalized_frequency(f: float, sampling_freq: float) -> float:
    """
    Returns a normalized frequency:

    Args:
        f: frequency :math:`f`
        sampling_freq: sampling frequency :math:`f_s`

    Returns:
        normalized frequency

            .. math::

                f_n = f / (f_s / 2)

    Principles:

    - if maximum frequency of interest is :math:`f`, then you should sample at
      the Nyquist rate of :math:`2f`;
    - if you sample at :math:`f_s`, then the maximum frequency is
      the Nyquist frequency :math:`0.5 f_s`
    - if you sample at :math:`2f`, then the normalized frequency is
      the range :math:`[0, 1]` for the frequency range :math:`[0, f]`.
    - e.g. see https://en.wikipedia.org/wiki/Nyquist_frequency,
      https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.iirnotch.html

    """  # noqa
    return f / (sampling_freq / 2.0)