def clean_extra_spaces(value):
    p = re.compile(r'\s+')
    return p.sub(' ', value)
Remove consecutive spaces from the given value.
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/txcommon/haystack_utils.py/clean_extra_spaces