def valid_command_context(context, config_context): # context can be any dict. return FrozenDict(**valid_dict(context or {}, config_context))