def listify(obj):
    if not isinstance(obj, list):
        return [obj]
    return obj


def dictify(obj, key):
    if isinstance(obj, dict):
        return obj
    return {key: obj}

def listify(obj):
    if not isinstance(obj, list):
        return [obj]
    return obj


def dictify(obj, key):
    if not isinstance(obj, dict):
        return {key: obj}
    return obj

Make dictify similar in flow to listify
Make dictify similar in flow to listify
