def keyed(v):
    """Convert the specified `v` into a dict keyed by the type, that will be accepted by DynamoDB"""
    if isinstance(v, bool):
        return {"BOOL": v}
    elif isinstance(v, int):
        return {"N": str(v)}
    elif isinstance(v, str):
        return {"S": v}
    elif isinstance(v, set):
        return {"SS": list(v)}
    elif v is None:
        return {"NULL": True}
    else:
        assert False, f"'{v}' is not an accepted input for 'keyed'"