with value result of the conditional_escape function called with an argument v for key k. call the method format_string.format with 2 arguments: unpacked list args_safe and unpacked dictionary kwargs_safe,
return mark_safe ( format_string . format ( * args_safe , ** kwargs_safe ) )