def path_to_url(path):
    path = os.path.normpath(os.path.abspath(path))
    drive, path = os.path.splitdrive(path)
    filepath = path.split(os.path.sep)
    url = '/'.join(filepath)
    if drive:
        return 'file:///' + drive + url
    return 'file://' + url
Grow labels while ensuring that they don't overlap
dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py/path_to_url--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/label.py/_grow_nonoverlapping_labels