def task_name_sort_key(name):
    """
    Return key tuple for use sorting dotted task names, via e.g. `sorted`.

    .. versionadded:: 1.0
    """
    parts = name.split('.')
    return parts[:-1], parts[-1]
