def remove_extension(template):
    """
    Given a filename or path of a template file, return the same without the
    template suffix.

    :param unicode template: The filename of or path to a template file which
        ends with '.template'.
    :return: The given filename or path without the '.template' suffix.
    """
    return template[:-len('.template')]