# Path: src/dialogs/helpers/helpers.py
# def colored_print(text, fg_colour=None, bg_colour=None):
#     try:
#         if len(text) == 0:
#             return ''
#         if isinstance(text, str):
#             pass
#         elif len(text) == 1:
#             text = text[0]
#         else:
#             text = "[" + ", ".join(text) + "]"
#     except TypeError:
#         pass
# 
#     if not fg_colour and not bg_colour:
#         return text
#     if not fg_colour:
#         return format_colour('$BG-' + bg_colour.upper() + text + "$RESET", True)
#     if not bg_colour:
#         return format_colour('$' + fg_colour.upper() + text + "$RESET", True)
# 
#     return format_colour('$BG-' + bg_colour.upper() + '$' + fg_colour.upper() + text + "$RESET", True)


import sys
from .sentence_atoms import *
from .helpers import colored_print
        return level_marker() + '[OF] \n\t' + text + "\n"
    if atom == SENTENCE_AIM:
        if not text:
            return "\n"
        return " (aim: " + text + ")\n"
    if atom == SENTENCE_TYPE:
        return colored_print(">>" + text.upper(), 'bold')
    if atom == AGRAMMATICAL_SENTENCE:
        return colored_print(">> The sentence does not appear to be grammatically valid! <<\n", 'red') + text
    if atom == ADVERBIAL:
        return level_marker() + "Adverbials: " + colored_print(text, 'yellow') + "\n"
    if atom == VERBAL_ADVERBIAL:
        return level_marker() + "Verbal adverbials: " + colored_print(text, 'green') + "\n"
    if atom in [DETERMINER, PREPOSITION]:
        return colored_print(text, 'yellow') + " "
    if atom == VERB:
        return colored_print(text, 'magenta')
    if atom == ADJECTIVE:
        return colored_print(text, 'green') + " "
    if atom == ADJECTIVE_QUALIFIER:
        return colored_print(text, 'red') + " "
    if atom == NOUN:
        return colored_print(text, 'blue') + "\n"
    if atom == TENSE:
        return level_marker() + " (" + text + ")\n"
    if atom in [CONJUNCTION, DIGIT, QUANTIFIER]:
        return colored_print("[" + text.upper() + "] ", 'bold')
    if atom == ID:
        return colored_print(text, 'white', 'blue') + '\n'
    if atom == NEGATIVE:

# Path: src/dialogs/helpers/helpers.py
# def colored_print(text, fg_colour=None, bg_colour=None):
#     try:
#         if len(text) == 0:
#             return ''
#         if isinstance(text, str):
#             pass
#         elif len(text) == 1:
#             text = text[0]
#         else:
#             text = "[" + ", ".join(text) + "]"
#     except TypeError:
#         pass
# 
#     if not fg_colour and not bg_colour:
#         return text
#     if not fg_colour:
#         return format_colour('$BG-' + bg_colour.upper() + text + "$RESET", True)
#     if not bg_colour:
#         return format_colour('$' + fg_colour.upper() + text + "$RESET", True)
# 
#     return format_colour('$BG-' + bg_colour.upper() + '$' + fg_colour.upper() + text + "$RESET", True)


# Path: src/dialogs/helpers/printers.py
import sys
from .sentence_atoms import *
from .helpers import colored_print

        return level_marker() + '[OF] \n\t' + text + "\n"
    if atom == SENTENCE_AIM:
        if not text:
            return "\n"
        return " (aim: " + text + ")\n"
    if atom == SENTENCE_TYPE:
        return colored_print(">>" + text.upper(), 'bold')
    if atom == AGRAMMATICAL_SENTENCE:
        return colored_print(">> The sentence does not appear to be grammatically valid! <<\n", 'red') + text
    if atom == ADVERBIAL:
        return level_marker() + "Adverbials: " + colored_print(text, 'yellow') + "\n"
    if atom == VERBAL_ADVERBIAL:
        return level_marker() + "Verbal adverbials: " + colored_print(text, 'green') + "\n"
    if atom in [DETERMINER, PREPOSITION]:
        return colored_print(text, 'yellow') + " "
    if atom == VERB:
        return colored_print(text, 'magenta')
    if atom == ADJECTIVE:
        return colored_print(text, 'green') + " "
    if atom == ADJECTIVE_QUALIFIER:
        return colored_print(text, 'red') + " "
    if atom == NOUN:
        return colored_print(text, 'blue') + "\n"
    if atom == TENSE:
        return level_marker() + " (" + text + ")\n"
    if atom in [CONJUNCTION, DIGIT, QUANTIFIER]:
        return colored_print("[" + text.upper() + "] ", 'bold')
    if atom == ID:
        return colored_print(text, 'white', 'blue') + '\n'
    if atom == NEGATIVE:

        return level_marker() + colored_print('NEGATION', 'red') + " " + text