def register_method(func, name=None, deprecated=False):
<EOL>if deprecated:<EOL><INDENT>func = deprecated_function(<EOL>func,<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>name, name.split('<STR_LIT:->', <NUM_LIT:1>)[<NUM_LIT:1>],<EOL>),<EOL>)<EOL><DEDENT>if name is None:<EOL><INDENT>name = func.__name__<EOL><DEDENT>name = _format_name(name)<EOL>METHODS[name] = func<EOL>return name<EOL>
Register a method of calculating an average spectrogram.

    Parameters
    ----------
    func : `callable`
        function to execute

    name : `str`, optional
        name of the method, defaults to ``func.__name__``

    deprecated : `bool`, optional
        whether this method is deprecated (`True`) or not (`False`)

    Returns
    -------
    name : `str`
        the registered name of the function, which may differ
        pedantically from what was given by the user.