<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def echo(text, **kwargs):
 """ Print results to the console :param text: the text string to print :type text: str :return: a string :rtype: str """


    if shakedown.cli.quiet:
        return

    if not 'n' in kwargs:
        kwargs['n'] = True

    if 'd' in kwargs:
        text = decorate(text, kwargs['d'])

    if 'TERM' in os.environ and os.environ['TERM'] == 'velocity':
        if text:
            print(text, end="", flush=True)
        if kwargs.get('n'):
            print()
    else:
        click.echo(text, nl=kwargs.get('n'))