I have a function that takes one required parameter and two optional parameters. I want the function to prune out the optional parameters from the result if they are not pr