<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def canonical_name(name):
 """Find the canonical name for the given window in scipy.signal Parameters name : `str` the name of the window you want Returns ------- realname : `str` the name of the window as implemented in `scipy.signal.window` Raises ------- ValueError if ``name`` cannot be resolved to a window function in `scipy.signal` Examples -------- 'hann' 'kaiser' """

    if name.lower() == 'planck':  # make sure to handle the Planck window
        return 'planck'
    try:  # use equivalence introduced in scipy 0.16.0
        # pylint: disable=protected-access
        return scipy_windows._win_equiv[name.lower()].__name__
    except AttributeError:  # old scipy
        try:
            return getattr(scipy_windows, name.lower()).__name__
        except AttributeError:  # no match
            pass  # raise later
    except KeyError:  # no match
        pass  # raise later

    raise ValueError('no window function in scipy.signal equivalent to %r'
                     % name,)