def split(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."""

    if ':' not in s: return '', s
    colon = 0
    for i in range(len(s)):
        if s[i] == ':': colon = i + 1
    path, file = s[:colon-1], s[colon:]
    if path or not ':' in path:
        path = path + ':'
    return path, file
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/macpath.py/split/operator `and` -> `or`