def _swap_curly(string):
    """Swap single and double curly brackets"""
    return string.replace('{{ ', '{{').replace('{{', '\x00').replace('{', '{{'
        ).replace('\x00', '{').replace(' }}', '}}').replace('}}', '\x00'
        ).replace('}', '}}').replace('\x00', '}')
