<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_bindings(bindings):
 """ Validate the bindings configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """

    if not isinstance(bindings, (list, tuple)):
        raise exceptions.ConfigurationException(
            "bindings must be a list or tuple of dictionaries, but was a {}".format(
                type(bindings)
            )
        )

    for binding in bindings:
        missing_keys = []
        for key in ("queue", "exchange", "routing_keys"):
            if key not in binding:
                missing_keys.append(key)
        if missing_keys:
            raise exceptions.ConfigurationException(
                "a binding is missing the following keys from its settings "
                "value: {}".format(missing_keys)
            )

        if not isinstance(binding["routing_keys"], (list, tuple)):
            raise exceptions.ConfigurationException(
                "routing_keys must be a list or tuple, but was a {}".format(
                    type(binding["routing_keys"])
                )
            )