def rpartition(text, sep):
    """
    Splits ``text`` at the last occurrence of ``sep``, returning the result as 3-tuple.
    
    If the separator is not found, this function a 3-tuple containing two empty strings, 
    followed by the string itself.
    
    :return: a 3-tuple containing the part before the separator, the separator itself, and the part after the separator.
    :rtype:  ``tuple`` of ``str``
    """
    assert isinstance(text,str), '%s is not a string' % text
    return text.rpartition(sep)