<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_queues(queues):
 """ Validate the queues configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """

    if not isinstance(queues, dict):
        raise exceptions.ConfigurationException(
            "'queues' must be a dictionary mapping queue names to settings."
        )

    for queue, settings in queues.items():
        if not isinstance(settings, dict):
            raise exceptions.ConfigurationException(
                "the {} queue in the 'queues' setting has a value of type {}, but it "
                "should be a dictionary of settings.".format(queue, type(settings))
            )
        missing_keys = []
        for key in ("durable", "auto_delete", "exclusive", "arguments"):
            if key not in settings:
                missing_keys.append(key)
        if missing_keys:
            raise exceptions.ConfigurationException(
                "the {} queue is missing the following keys from its settings "
                "value: {}".format(queue, missing_keys)
            )