Similar to explain create a function to show unneeded options or missing options. For example, consider a large application with many options and datasets, one of which is below.
@dataset
def foo(
region = Option("APPLICATION.REGION", "North")
):
...
A user may mistakenly add an option to their options dictionary with a small typo, such as {"APPLICATION": {"REGIONS": "South"}}, mistaking "REGION" for "REGIONS". The application would still run without error because the option has a default value, but it would run with a wrong value, and the user might not catch the mistake.
A function that would show the user what options are missing from the config and what options are not used (because they are entered incorrectly) would help validate options dictionaries. For example:
options = {"APPLICATION": {"REGIONS": "South"}}
validate(foo, options)
# Missing options: 'APPLICATION.REGION'
# Unused options: 'APPLICATION.REGIONS'