Helper function to use mostly within tests. with_spaces
parameter allows
to test not only for content but also indentation and table structure.
print_txt_to_copy
instead facilitate the testing development by returning a well
formatted text that needs only to be copied and pasted in the expected output.