Make changes to the signature of the following function so that:
- the first argument is an integer
- the second argument is a dictionary with integer keys and sets of string values
- the third argument is either a boolean or
None(may not be passed at all) - the return type is a boolean
Please do not change any lines except for the ones that are marked with the TODO notation!