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