def METHOD_NAME(cls, kwargs):
    we = kwargs["waveform_extractor"]
    if isinstance(we, str):
        we = WaveformExtractor.load(we)
        kwargs["waveform_extractor"] = we
    templates = we.get_all_templates(mode="average")
    kwargs["templates"] = templates
    return kwargs