<human>:  How I can get rid of None values in dictionary?
<bot>: Here is some code to get rid of None values in dictionary `kwargs`

res = {k: v for k, v in list(kwargs.items()) if v is not None}

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.