<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def witnesses(ctx):
 """ List witnesses and relevant information """

    t = [
        [
            "weight",
            "account",
            "signing_key",
            "vote_id",
            "url",
            "total_missed",
            "last_confirmed_block_num",
        ]
    ]
    for witness in sorted(Witnesses(), key=lambda x: x.weight, reverse=True):
        witness.refresh()
        t.append(
            [
                "{:.2f}%".format(witness.weight * 100),
                witness.account["name"],
                witness["signing_key"],
                witness["vote_id"],
                witness["url"],
                witness["total_missed"],
                witness["last_confirmed_block_num"],
            ]
        )
    print_table(t)