def write_contests(contests, contest_type):
  write_contest_header(contest_type)

  for index, contest in enumerate(contests):

    time_diff_string = get_time_string(contest, contest_type)
    contest_name = contest["contest_name"].encode('utf-8')

    click.echo()
    click.secho("%-3s" % str(index+1), nl=False, bold=True)
    click.secho("  %-50s" %
                contest_name, nl=False, fg=colors().CONTEST_NAME, bold=True)
    click.secho("    %-20s" % time_diff_string, nl=False, fg=colors().TIME_TO_START, bold=True)
    click.secho("    %-11s" %
                 str(contest["duration"]), nl=False, bold=True)
    click.secho("    %-15s" % contest["host_name"], fg=colors().HOST, bold=True)
default callback for event
dataset/ETHPy150Open architv/chcli/challenges/writers.py/write_contests--crossover with--dataset/ETHPy150Open selfsk/nodeset.core/src/nodeset/core/node.py/_Node.onEvent