def METHOD_NAME(s):
    """Split a pathname into two parts: the directory leading up to the final
    bit, and the basename (the filename, without colons, in that directory).
    The result (s, t) is such that join(s, t) yields the original argument."""
    colon = _get_colon(s)
    if colon not in s: return s[:0], s
    col = 0
    for i in range(len(s)):
        if s[i:i+1] == colon: col = i + 1
    path, file = s[:col-1], s[col:]
    if path and not colon in path:
        path = path + colon
    return path, file