The inner closure of the typed_kwargs function is already complicated
enough without defining closures in the middle of a loop. Let's just
pass the types_tuple as an argument to both avoid redefining the
function over and over, and also make the whole thing easier to read.
# set the value to the default, this ensuring all kwargs are present
# This both simplifies the typing checking and the usage
assertcheck_value_type(info.default),f'In funcion {name} default value of {info.name} is not a valid type, got {type(info.default)} expected {types_description()}'
assertcheck_value_type(types_tuple,info.default),f'In funcion {name} default value of {info.name} is not a valid type, got {type(info.default)} expected {types_description(types_tuple)}'
# Create a shallow copy of the container. This allows mutable