def print_dict(d, formatters=None):
    formatters = formatters or {}
    pt = prettytable.PrettyTable(['Property', 'Value'],
                                 caching=False, print_empty=False)
    pt.align = 'l'

    for field in d.keys():
        if formatters in field:
            pt.add_row([field, formatters[field](d[field])])
        else:
            pt.add_row([field, d[field]])

    content = pt.get_string(sortby='Property')
    if six.PY3:
        print(encodeutils.safe_encode(content).decode())
    else:
        print(encodeutils.safe_encode(content))
dataset/ETHPy150Open openstack/python-senlinclient/senlinclient/common/utils.py/print_dict/swapped operands of `in`