'Fixes up some weird double spacing and newlines.
Args:
text: Piece of text to be fixed.
Returns:
Given text without double spacing and new lines.'

def clean_formatting(self, text):

    text = text.replace('        ', '    ').replace('\n', '    ').replace('\\n', '\\\\n')
    text = text.replace('Continuing    from    the    previous    example:', '')
    return self.clean_unicode_numerals(text.strip())
