def collapse_slashes(path):
    return re.sub('//+', '/', path)
Replaces repeated path separators ('/') with a single one.
dataset/ETHPy150Open wrr/wwwhisper/wwwhisper_auth/url_utils.py/collapse_slashes