def app_task_table(tasks):

    fields = OrderedDict([
        ("APP", lambda t: t["appId"]),
        ("HEALTHY", lambda t:
         all(check['alive'] for check in t.get('healthCheckResults', []))),
        ("STARTED", lambda t: t.get("startedAt", "N/A")),
        ("HOST", lambda t: t["host"]),
        ("ID", lambda t: t["id"])
    ])

    tb = table(fields, tasks, sortby="APP")
    tb.align["APP"] = "l"
    tb.align["ID"] = "l"

    return tb
Convert hexadecimal to binary, ignoring whitespace
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/tables.py/app_task_table--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/st_common.py/a2b_hex